public GroupObjectDescriptorRealisationTypeB(bool updateEnable, bool transmitEnable, bool segmentSelectorEnable, bool writeEnable, bool readEnable, bool communicationEnable, CEMIPriority priority, ComObjectValueType valueType) { UpdateEnable = updateEnable; TransmitEnable = transmitEnable; SegmentSelectorEnable = segmentSelectorEnable; WriteEnable = writeEnable; ReadEnable = readEnable; CommunicationEnable = communicationEnable; Priority = priority; ValueType = valueType; }
public static byte?SizeInBytes(this ComObjectValueType value) { switch (value) { case ComObjectValueType.BIT1: { /* '0x00' */ return(1); } case ComObjectValueType.BIT2: { /* '0x01' */ return(1); } case ComObjectValueType.BIT3: { /* '0x02' */ return(1); } case ComObjectValueType.BIT4: { /* '0x03' */ return(1); } case ComObjectValueType.BIT5: { /* '0x04' */ return(1); } case ComObjectValueType.BIT6: { /* '0x05' */ return(1); } case ComObjectValueType.BIT7: { /* '0x06' */ return(1); } case ComObjectValueType.BYTE1: { /* '0x07' */ return(1); } case ComObjectValueType.BYTE2: { /* '0x08' */ return(2); } case ComObjectValueType.BYTE3: { /* '0x09' */ return(3); } case ComObjectValueType.BYTE4: { /* '0x0A' */ return(4); } case ComObjectValueType.BYTE6: { /* '0x0B' */ return(6); } case ComObjectValueType.BYTE8: { /* '0x0C' */ return(8); } case ComObjectValueType.BYTE10: { /* '0x0D' */ return(10); } case ComObjectValueType.BYTE14: { /* '0x0E' */ return(14); } default: { return(0); } } }