/// <summary> /// Sets all the parameters and sends DATA_B3_REQ message to CAPI message queue /// </summary> /// <param name="CAPImsg">Message to send</param> /// <param name="controller">Number of controller</param> /// <param name="PLCI">Physical Link Connection Identifier</param> /// <param name="NCCI">Network Control Connection Identifier</param> /// <param name="dane">Data to send</param> /// <param name="info">Result code</param> /// <returns>True if success, otherwise false</returns> public static bool Send_msg_data_b3_req(ref CAPI_Message CAPImsg, byte controller, byte PLCI, short NCCI, Processes.IDBuffer dane, out uint info) { CAPImsg.reset_offset(); CAPImsg.appID = (short)app_ID; CAPImsg.sub_com = comsub.DATA_B3_REQ; CAPImsg.controller = controller; CAPImsg.plci = PLCI; CAPImsg.ncci = NCCI; CAPImsg.length = 22; CAPImsg.WriteIntPtr(dane.uMessagePtr); CAPImsg.WriteInt16((short)dane.userDataLength); CAPImsg.WriteInt16(0); TInterfaceError ret = CAPI_PUT_MESSAGE(app_ID, CAPImsg.uMessagePtr); info = (uint)ret; return(ret == TInterfaceError.SUCCESS); }
/// <summary> /// Copies the data from CAPI buffer to IDBuffer /// </summary> /// <param name="bufor">Buffer to copy data to</param> public void Get_Data(Processes.IDBuffer bufor) { offset = 12; bufor.CopyToBuffor(ReadIntPtr(), (uint)ReadInt16()); }