diff --git a/info/code.go b/info/code.go index 4163914..cf236b3 100644 --- a/info/code.go +++ b/info/code.go @@ -467,28 +467,28 @@ var errCauseZero = errors.New("part5: cause of transmission <0> is not used") // “Additional cause of transmission”. const ( _ Cause = iota // 0: not defined - Percyc // periodic, cyclic + Cyclic // periodic, cyclic Back // background scan Spont // spontaneous Init // initialized Req // request or requested Act // activation - Actcon // activation confirmation + ActCon // activation confirmation Deact // deactivation - Deactcon // deactivation confirmation + DeactCon // deactivation confirmation - Actterm // activation termination - Retrem // return information caused by a remote command - Retloc // return information caused by a local command + ActTerm // activation termination + RetRem // return information caused by a remote command + RetLoc // return information caused by a local command File // file transfer Auth // authentication - Seskey // maintenance of authentication session key - Usrkey // maintenance of user role and update key + SesKey // maintenance of authentication session key + UsrKey // maintenance of user role and update key _ // 17: reserved for further compatible definitions _ // 18: reserved for further compatible definitions _ // 19: reserved for further compatible definitions - Inrogen // interrogated by station interrogation + InroGen // interrogated by station interrogation Inro1 // interrogated by group 1 interrogation Inro2 // interrogated by group 2 interrogation Inro3 // interrogated by group 3 interrogation @@ -506,12 +506,12 @@ const ( Inro14 // interrogated by group 14 interrogation Inro15 // interrogated by group 15 interrogation Inro16 // interrogated by group 16 interrogation - Reqcogen // requested by general counter request - Reqco1 // requested by group 1 counter request - Reqco2 // requested by group 2 counter request - Reqco3 // requested by group 3 counter request + ReqCoGen // requested by general counter request + ReqCo1 // requested by group 1 counter request + ReqCo2 // requested by group 2 counter request + ReqCo3 // requested by group 3 counter request - Reqco4 // requested by group 4 counter request + ReqCo4 // requested by group 4 counter request _ // 41: reserved for further compatible definitions _ // 42: reserved for further compatible definitions UnkType // unknown type identification @@ -561,7 +561,7 @@ func (c Cause) String() string { var causeLabels = [64]string{ "notdef", - "per/cyc", + "cyclic", // conform section 5 instead of "per/cyc" introduced by companion standard 101 "back", "spont", "init", diff --git a/info/packet_test.go b/info/packet_test.go index c9eac36..60b20d0 100644 --- a/info/packet_test.go +++ b/info/packet_test.go @@ -16,12 +16,12 @@ var goldenDataUnits = []struct { DataUnit[OrigAddr8, ComAddr16, ObjAddr16]{ Type: M_SP_NA_1, Enc: 1, - Cause: Percyc, + Cause: Cyclic, Orig: Wide.MustOrigAddrN(7), Addr: Wide.MustComAddrN(1001), Info: []byte{1, 2, 3}, }, - "M_SP_NA_1 per/cyc 7 1001: 0x03@513 .", + "M_SP_NA_1 cyclic 7 1001: 0x03@513 .", }, { DataUnit[OrigAddr8, ComAddr16, ObjAddr16]{ Type: M_DP_NA_1, @@ -38,11 +38,11 @@ var goldenDataUnits = []struct { DataUnit[OrigAddr8, ComAddr16, ObjAddr16]{ Type: M_SP_NA_1, Enc: 0, - Cause: Percyc, + Cause: Cyclic, Addr: Wide.MustComAddrN(404), Info: []byte{}, }, - "M_SP_NA_1 per/cyc 0 404: .", + "M_SP_NA_1 cyclic 0 404: .", }, { DataUnit[OrigAddr8, ComAddr16, ObjAddr16]{ Type: M_DP_NA_1, diff --git a/part5.go b/part5.go index 51818cd..7127e5a 100644 --- a/part5.go +++ b/part5.go @@ -43,7 +43,7 @@ func isCommand(t info.TypeID) bool { return t-45 < 25 } -// Response alternatives to info.Actcon are propagated as errors for simplicity. +// Response alternatives to info.ActCon are propagated as errors for simplicity. var ( // A negative confirm denies without justification. ErrConNeg = errors.New("part5: command not activated [actcon, P/N := <1>]") @@ -77,18 +77,18 @@ func ConOf[Orig info.OrigAddr, Com info.ComAddr, Obj info.ObjAddr](in, req info. // match cause of transmission, or not switch in.Cause &^ info.TestFlag { - case info.Actcon: + case info.ActCon: if req.Cause&^info.TestFlag == info.Act { return nil // OK } - case info.Deactcon: + case info.DeactCon: if req.Cause&^info.TestFlag == info.Deact { return nil // OK } - case info.Actcon | info.NegFlag: + case info.ActCon | info.NegFlag: return ErrConNeg - case info.Actterm: + case info.ActTerm: return ErrTerm // “ASDUs in the control direction with undefined values in the data