public ATBytesUnsafe(Foundation.ATBytesUnsafe _0) { _Instance = Marshal.AllocHGlobal(sizeof(Foundation.ATBytesUnsafe._Internal)); _ownsNativeInstance = true; NativeToManagedMap[_Instance] = this; *((Foundation.ATBytesUnsafe._Internal *)_Instance) = *((Foundation.ATBytesUnsafe._Internal *)_0._Instance); }
/// <summary>Get a digital port state value from data</summary> /// <param name="data">The data</param> /// <param name="ports">On return, contains the digital port state value</param> /// <returns>`true` if successful</returns> public static bool ATPortsParseData(Foundation.ATBytesUnsafe data, byte *ports) { if (ReferenceEquals(data, null)) { throw new ArgumentNullException("data", "Cannot be null because it is passed by value."); } var _arg0 = data._Instance; var _ret = _Internal.ATPortsParseData(_arg0, ports); return(_ret); }
/// <summary>Get a port value from data</summary> /// <param name="data">The data</param> /// <param name="port">On return, contains the port value</param> /// <returns>`true` if successful</returns> public static bool ATPortParseData(Foundation.ATBytesUnsafe data, ref DeviceTypes.ATPortEnum port) { if (ReferenceEquals(data, null)) { throw new ArgumentNullException("data", "Cannot be null because it is passed by value."); } var _arg0 = data._Instance; fixed(DeviceTypes.ATPortEnum *_port1 = &port) { var _arg1 = _port1; var _ret = _Internal.ATPortParseData(_arg0, _arg1); return(_ret); } }
public static string ATBytesDescription(Foundation.ATBytesUnsafe data, sbyte *buffer, ulong bufferCapacity) { if (ReferenceEquals(data, null)) { throw new ArgumentNullException("data", "Cannot be null because it is passed by value."); } var _arg0 = data._Instance; var _ret = _Internal.ATBytesDescription(_arg0, buffer, bufferCapacity); if (_ret == IntPtr.Zero) { return(default(string)); } var _retPtr = (byte *)_ret; int _length = 0; while (*(_retPtr++) != 0) { _length += sizeof(byte); } return(Text.Encoding.UTF8.GetString((byte *)_ret, _length)); }