/// <summary> /// <para>Initializes a new instance of the class CallInfo from the ALPData storage.</para> /// <para>Reads the necessary number of bytes from the provided data storage and advances the current position.</para> /// </summary> /// <param name="data">Any object deriving from ALPData that holds the data.</param> public CallInfo(AltiLinkPlus.ALPData data) { base.ToALPData(data.ReadBytes(Length)); Position = 0; lineID = CallHandle = ReadInt32(); SessionHandle = ReadInt32(); callerPAD = ReadInt32(); callerIPAddress = ReadInt32(); callerID = ReadString(41); callerName = ReadString(65); calleePAD = ReadInt32(); accessCode = ReadString(1); calleeID = ReadString(41); calleeName = ReadString(65); workgroupPAD = ReadInt32(); WorkGroupNumber = ReadString(9); OutBoundWorkGroupNumber = ReadString(8); DNISName = ReadString(65); DNISID = ReadString(41); ANIName = ReadString(65); ANIID = ReadString(41); this.CurrentTime = ConvertTime.ToDateTime(ReadInt32()); this.StartTime = ConvertTime.ToDateTime(ReadInt32()); this.HoldTime = ConvertTime.ToDateTime(ReadInt32()); }
/// <summary> /// <para>Initializes a new instance of the class LineInfo from the ALPData storage.</para> /// <para>Reads the necessary number of bytes from the provided data storage and advances the current position.</para> /// </summary> /// <param name="data">Any object deriving from ALPData that holds the data.</param> public LineInfo(AltiLinkPlus.ALPData data) { base.ToALPData(data.ReadBytes(Length)); Position = 0; lineHandle = ReadInt32(); Position = 8; lineType = ReadInt32(); Position = 12; lineNumber = ReadString(12); Position = 33; firstName = ReadString(32); Position = 65; lastName = ReadString(32); physPort = ReadString(5); direction = ReadByte(); accessDigit = ReadByte(); lineSubType = ReadByte(); }
/// <summary> /// <para>Initializes a new instance of the class CallInfo from the ALPData storage.</para> /// <para>Reads the necessary number of bytes from the provided data storage and advances the current position.</para> /// </summary> /// <param name="data">Any object deriving from ALPData that holds the data.</param> public CallInfo(AltiLinkPlus.ALPData data) { base.ToALPData(data.ReadBytes(Length)); Position = 0; lineID = ReadInt32(); Position = 16; callerID = ReadString(41); callerName = ReadString(65); Position += 4; accessCode = ReadString(1); calleeID = ReadString(41); calleeName = ReadString(65); Position += 25; DNISName = ReadString(65); DNISID = ReadString(41); ANIName = ReadString(65); ANIID = ReadString(41); }
/// <summary> /// <para>Initializes a new instance of the class LineInfo from the ALPData storage.</para> /// <para>Reads the necessary number of bytes from the provided data storage and advances the current position.</para> /// </summary> /// <param name="data">Any object deriving from ALPData that holds the data.</param> /// <param name="versionID">ALPV2 version (differences in parameters for versions 2.7 and higher).</param> public LineInfo(AltiLinkPlus.ALPData data, int versionID) { // Length of the LineInfo stucture is based on the version of AltiLink: if (versionID > 0x26FF) { this.Length = 111; } else { this.Length = 105; } base.ToALPData(data.ReadBytes(Length)); Position = 0; lineHandle = ReadInt32(); Position = 8; lineType = ReadInt32(); Position = 12; lineNumber = ReadString(12); Position = 33; firstName = ReadString(32); Position = 65; lastName = ReadString(32); physPort = ReadString(6); Position--; direction = ReadByte(); accessDigit = ReadByte(); lineSubType = ReadByte(); }
/// <summary> /// <para>Initializes a new instance of the class StateInfo from the ALPData storage.</para> /// <para>Reads the necessary number of bytes from the provided data storage and advances the current position.</para> /// </summary> /// <param name="data">Any object deriving from ALPData that holds the data.</param> public LineStateInfo(AltiLinkPlus.ALPData data) { base.ToALPData(data.ReadBytes(Length)); Position = 0; lineID = ReadInt32(); commandID = ReadInt32(); cmdStatus = ReadInt32(); cmdData = ReadInt32(); }