Beispiel #1
0
        /// <summary>
        /// Set bit from index and value
        /// </summary>
        /// <param name="tagHandle"></param>
        /// <param name="value"></param>
        /// <param name="offset"></param>
        private static int SetBool(int tagHandle, object value, int offset)
        {
            byte byteValue = (byte)((bool)value ? 1 : 0);

            return(NativeLibrary.plc_tag_set_uint8(tagHandle, offset, byteValue));
        }
Beispiel #2
0
 /// <summary>
 /// Set local value UInt8
 /// </summary>
 /// <param name="tagHandle"></param>
 /// <param name="value"></param>
 /// <param name="offset"></param>
 private static int SetUInt8(int tagHandle, object value, int offset)
 {
     return(NativeLibrary.plc_tag_set_uint8(tagHandle, offset, (byte)value));
 }