public PGNConfigurationRepresentation FirstField(string fieldName, int bitLength, Action<PGNField> pgnField) { currentOrder = 1; currentBitOffset = 0; PGNField field = new PGNField { Order = currentOrder, Name = fieldName, BitLength = bitLength, BitOffset = 0}; pgnField(field); currentPGNField = field; pgnFields.Add(field); return this; }
public PGNConfigurationRepresentation NextField(string fieldName, int bitLength, Action <PGNField> pgnField) { currentOrder++; currentBitOffset = pgnFields.Sum(x => x.BitLength); // should manually increment... PGNField field = new PGNField { Name = fieldName, Order = currentOrder, BitOffset = currentBitOffset, BitLength = bitLength }; pgnField(field); currentPGNField = field; pgnFields.Add(field); return(this); }
public PGNConfigurationRepresentation FirstField(string fieldName, int bitLength, Action <PGNField> pgnField) { currentOrder = 1; currentBitOffset = 0; PGNField field = new PGNField { Order = currentOrder, Name = fieldName, BitLength = bitLength, BitOffset = 0 }; pgnField(field); currentPGNField = field; pgnFields.Add(field); return(this); }
public PGNConfigurationRepresentation NextField(string fieldName, int bitLength, Action<PGNField> pgnField) { currentOrder++; currentBitOffset = pgnFields.Sum(x => x.BitLength); // should manually increment... PGNField field = new PGNField { Name = fieldName, Order = currentOrder, BitOffset = currentBitOffset, BitLength = bitLength}; pgnField(field); currentPGNField = field; pgnFields.Add(field); return this; }