Example #1
0
        public static void ToValueTcpType(TcpTypeWord tcpType, uint value)
        {
            if (tcpType == null)
            {
                throw new ArgumentNullException(nameof(tcpType));
            }

            tcpType.Value = Convert.ToUInt16(value);
        }
Example #2
0
 protected override void UpdateEnumContentValue(TcpTypeWord enumContent, TEnum value)
 {
     enumContent.Value = Convert.ToUInt16(value);
 }
Example #3
0
 public static ushort ToUInt16(TcpTypeWord value)
 {
     return(value == null ? _DefaultUInt16Value : Convert.ToUInt16(value.Value));
 }
Example #4
0
 public static byte ToByte(TcpTypeWord value)
 {
     return(value == null ? _DefaultByteValue : Convert.ToByte(value.Value));
 }
Example #5
0
 public static bool ToBoolean(TcpTypeWord value)
 {
     return(value == null ? _DefaultBooleanValue : Convert.ToBoolean(value.Value));
 }
Example #6
0
 public static uint ToUInt32(TcpTypeWord value)
 {
     return(value == null ? _DefaultUInt32Value : Convert.ToUInt32(value.Value));
 }