|
@@ -37,7 +37,7 @@ func HandleAMI(event map[string]string) {
|
|
|
//lfshook.NewLogger().Infof("===PA interrupt PAD====== ")
|
|
//lfshook.NewLogger().Infof("===PA interrupt PAD====== ")
|
|
|
|
|
|
|
|
InterruptRunningTask("PA")
|
|
InterruptRunningTask("PA")
|
|
|
- time.Sleep(time.Millisecond * 100) //wait endpoimt release
|
|
|
|
|
|
|
+ time.Sleep(time.Millisecond * 200) //wait endpoimt release
|
|
|
case "*": //Cab cab interrupt PAD
|
|
case "*": //Cab cab interrupt PAD
|
|
|
//lfshook.NewLogger().Infof("===Cab cab interrupt PAD====== ")
|
|
//lfshook.NewLogger().Infof("===Cab cab interrupt PAD====== ")
|
|
|
|
|
|
|
@@ -177,14 +177,17 @@ func HandleAMI(event map[string]string) {
|
|
|
//切割&加密之后发送生成的文件名到STC;
|
|
//切割&加密之后发送生成的文件名到STC;
|
|
|
alstatus.SendRecordFile(DstFile, event["RecordType"])
|
|
alstatus.SendRecordFile(DstFile, event["RecordType"])
|
|
|
|
|
|
|
|
- trainInfo = fmt.Sprintf("Train Number %s CabNumber %s", active.TrainNum, active.ActivedCab)
|
|
|
|
|
|
|
+ trainInfo = fmt.Sprintf("TrainNumber %s ", active.TrainNum)
|
|
|
|
|
|
|
|
if strings.Contains(event["FILENAME"], "PAD") {
|
|
if strings.Contains(event["FILENAME"], "PAD") {
|
|
|
_, caller, callee := utils.GetPadInfo(event["FILENAME"])
|
|
_, caller, callee := utils.GetPadInfo(event["FILENAME"])
|
|
|
|
|
+ trainInfo = fmt.Sprintf("TrainNumber %s CarNumber %s ", active.TrainNum, active.TrainInfoMap[active.TrainNum][int(caller[2])])
|
|
|
|
|
+ lfshook.NewLogger().Infof("Train info=============%s===============", trainInfo)
|
|
|
|
|
+
|
|
|
if len(caller) == 4 && len(caller) > 0 {
|
|
if len(caller) == 4 && len(caller) > 0 {
|
|
|
- utils.Logger.Printf("Train Information: CabNumber %s, MessageType: PAD , CabNumber: %c , LocationCode: %c, Connected: %s, RecordFileName:%s", trainInfo, caller[2], caller[3], callee, DstFile)
|
|
|
|
|
|
|
+ utils.Logger.Printf("Train Information: %s, MessageType: PAD , LocationCode: %c, Connected: %s, RecordFileName:%s", trainInfo, caller[3], callee, DstFile)
|
|
|
} else {
|
|
} else {
|
|
|
- utils.Logger.Printf("Train Information: CabNumber %s, MessageType: PAD , RecordFileName:%s . Can not get caller and callee !", trainInfo, DstFile)
|
|
|
|
|
|
|
+ utils.Logger.Printf("Train Information: %s, MessageType: PAD , RecordFileName:%s . Can not get caller and callee !", trainInfo, DstFile)
|
|
|
}
|
|
}
|
|
|
} else if strings.Contains(event["FILENAME"], "PA") {
|
|
} else if strings.Contains(event["FILENAME"], "PA") {
|
|
|
_, caller, _ := utils.GetPadInfo(event["FILENAME"])
|
|
_, caller, _ := utils.GetPadInfo(event["FILENAME"])
|