public Apdu(TLV tlv) : this() { base.Identifier = BerIdentifier.Encode(BerIdentifier.Application, BerIdentifier.Constructed, 1); base.Bytes = tlv.Bytes; ByteArraySegment pdu = tlv.Value.Bytes; pdu.Length = 0; TLV tmp = new TLV(pdu.EncapsulatedBytes()); gocbRef = new VisibleString(tmp); pdu.Length += tmp.Bytes.Length; tmp = new TLV(pdu.EncapsulatedBytes()); timeAllowedtoLive = new Integer(tmp); pdu.Length += tmp.Bytes.Length; tmp = new TLV(pdu.EncapsulatedBytes()); datSet = new VisibleString(tmp); pdu.Length += tmp.Bytes.Length; tmp = new TLV(pdu.EncapsulatedBytes()); if (IsGoIDTag(tmp.Tag.RawBytes)) { goID = new VisibleString(tmp); } pdu.Length += tmp.Bytes.Length; tmp = new TLV(pdu.EncapsulatedBytes()); t = new UtcTime(tmp); pdu.Length += tmp.Bytes.Length; tmp = new TLV(pdu.EncapsulatedBytes()); stNum = new Integer(tmp); pdu.Length += tmp.Bytes.Length; tmp = new TLV(pdu.EncapsulatedBytes()); sqNum = new Integer(tmp); pdu.Length += tmp.Bytes.Length; tmp = new TLV(pdu.EncapsulatedBytes()); test = new TAsn1.Boolean(tmp); pdu.Length += tmp.Bytes.Length; tmp = new TLV(pdu.EncapsulatedBytes()); confRev = new Integer(tmp); pdu.Length += tmp.Bytes.Length; tmp = new TLV(pdu.EncapsulatedBytes()); ndsCom = new TAsn1.Boolean(tmp); pdu.Length += tmp.Bytes.Length; tmp = new TLV(pdu.EncapsulatedBytes()); numDatSetEntries = new Integer(tmp); pdu.Length += tmp.Bytes.Length; tmp = new TLV(pdu.EncapsulatedBytes()); int cnt = 0; // int len = tmp.Value.Bytes.Length; TLV data = new TLV(tmp.Value.Bytes); allData.Add(new Data(data)); cnt++; while (cnt < numDatSetEntries.Value) { data = new TLV(tmp.Value.Bytes.EncapsulatedBytes()); tmp.Value.Bytes.Length += data.Bytes.Length; //TLV data = new TLV(tmp.Value.Bytes); allData.Add(new Data(data)); cnt++; //tmp.Value.Bytes.Length += data.Bytes.Length; } }
public OctetString() { this.Identifier = BerIdentifier.Encode(BerIdentifier.Universal, BerIdentifier.Primitive, BerIdentifier.OctetString); }
private static bool IsGoIDTag(byte[] tag) { return(tag.IsSame(BerIdentifier.Encode(BerIdentifier.ContextSpecific, BerIdentifier.Primitive, 3))); }
public Structure() { this.Identifier = BerIdentifier.Encode(BerIdentifier.ContextSpecific, BerIdentifier.Constructed, 2); Values = new List <object>(); Types = new List <VariableType>(); }
public InformationReport() { // According to MMS defination this.Identifier = BerIdentifier.Encode(BerIdentifier.ContextSpecific, BerIdentifier.Constructed, 0); this.ListOfAccessResultId = BerIdentifier.Encode(BerIdentifier.ContextSpecific, BerIdentifier.Constructed, 0); }
public Integer() { this.Identifier = BerIdentifier.Encode(BerIdentifier.Universal, BerIdentifier.Primitive, BerIdentifier.Integer); }
public FloatPoint() { this.Identifier = BerIdentifier.Encode(BerIdentifier.ContextSpecific, BerIdentifier.Primitive, 12); }
public VisibleString() { this.Identifier = BerIdentifier.Encode(BerIdentifier.Universal, BerIdentifier.Primitive, BerIdentifier.VisibleString); }
public UnconfirmedPdu() { // According to the MMS standard's defination. this.Identifier = BerIdentifier.Encode(BerIdentifier.ContextSpecific, BerIdentifier.Constructed, 3); }
public UtcTime() { this.Identifier = BerIdentifier.Encode(BerIdentifier.ContextSpecific, BerIdentifier.Primitive, 17); }
public ListOfAccessResult() { this.Identifier = BerIdentifier.Encode(BerIdentifier.ContextSpecific, BerIdentifier.Constructed, 0); }
public TimeOfDay() { this.Identifier = BerIdentifier.Encode(BerIdentifier.ContextSpecific, BerIdentifier.Primitive, 12); }
public Boolean() { this.Identifier = BerIdentifier.Encode(BerIdentifier.Universal, BerIdentifier.Primitive, BerIdentifier.Boolean); }
public VariableListName() { this.Identifier = BerIdentifier.Encode(BerIdentifier.ContextSpecific, BerIdentifier.Primitive, 0); //this.Bytes= }