protected override void InitializeProperties(object[] properties, int startIndex) { Length = (uint)properties[0] + Package.NotDataLength; SN = (uint)properties[1]; BusinessID = (BusinessType)properties[2]; JT809Config jt809Config = (JT809Config)properties[3]; SessionId = jt809Config.SessionId; JT809Version = jt809Config.JT809Version; EncryptOpition = jt809Config.JT809EncryptConfig == null? EncryptOpitions.None: EncryptOpitions.Common; if (jt809Config.JT809EncryptConfig == null) { EncryptOpition = EncryptOpitions.None; } else { EncryptOpition = EncryptOpitions.Common; EncryptKey = jt809Config.JT809EncryptConfig.Key; } }
public Header(uint length, BusinessType businessID, JT809Config jt809Config) : this(length, CounterOnSendGenerater, businessID, jt809Config) { }
public Package(Header header, MessageBody body, JT809Config jt809Config) : base(header, body) { JT809Config = jt809Config; }
internal Header(uint length, uint number, BusinessType businessID, JT809Config jt809Config) : base(length, number, businessID, jt809Config) { CounterOnSendGenerater++; }
public static Package GeneratePackage(BusinessType businessType, MessageBody messageBody, JT809Config jt809Config) { var header = new Header((uint)messageBody.Buffer.Length, businessType, jt809Config); return(new Package(header, messageBody, jt809Config)); }