|
@@ -181,7 +181,11 @@ func HandleAMI(event map[string]string) {
|
|
|
|
|
|
|
|
if strings.Contains(event["FILENAME"], "PAD") {
|
|
if strings.Contains(event["FILENAME"], "PAD") {
|
|
|
_, caller, callee := utils.GetPadInfo(event["FILENAME"])
|
|
_, caller, callee := utils.GetPadInfo(event["FILENAME"])
|
|
|
- utils.Logger.Printf("Train Information:%s , MessageType: PAD , CabNumber: %c , LocationCode: %c, Connected: %s, RecordFileName:%s", trainInfo, caller[2], caller[3], callee, DstFile)
|
|
|
|
|
|
|
+ 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)
|
|
|
|
|
+ } else {
|
|
|
|
|
+ utils.Logger.Printf("Train Information: CabNumber %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"])
|
|
|
utils.Logger.Printf("Train Information:%s , MessageType: PA, Caller: %s, RecordFileName: %s", trainInfo, caller, DstFile)
|
|
utils.Logger.Printf("Train Information:%s , MessageType: PA, Caller: %s, RecordFileName: %s", trainInfo, caller, DstFile)
|