public static string DecodeError(int code) { return(Marshal.PtrToStringAnsi(NativeLibrary.plc_tag_decode_error(code))); }
/// <summary> /// Decode libplctag error code /// </summary> /// <param name="code">Error code</param> /// <returns></returns> public static string DecodeError(int code) { return(NativeLibrary.DecodeError(code)); }
/// <summary> /// Set local value UInt16 /// </summary> /// <param name="tagHandle"></param> /// <param name="value"></param> /// <param name="offset"></param> private static int SetUInt16(int tagHandle, object value, int offset) { return(NativeLibrary.plc_tag_set_uint16(tagHandle, offset, (UInt16)value)); }
/// <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)); }
/// <summary> /// Set local value Float /// </summary> /// <param name="tagHandle"></param> /// <param name="value"></param> /// <param name="offset"></param> private static int SetFloat64(int tagHandle, object value, int offset) { return(NativeLibrary.plc_tag_set_float64(tagHandle, offset, (double)value)); }
/// <summary> /// Set local value Int64 /// </summary> /// <param name="tagHandle"></param> /// <param name="value"></param> /// <param name="offset"></param> private static int SetInt64(int tagHandle, object value, int offset) { return(NativeLibrary.plc_tag_set_int64(tagHandle, offset, (Int64)value)); }