SendMessage is used to transmit BxNet commands to a device.
Example Requests
Single Command
let result =awaitapp.businessFunction({//Common Parameters for all functions functionName:"BizerbaSoap", methodName:"SendMessage", silentMode: false, //false is default. If set to true, the Gebra Suite will not show an error message box. it is up to you to inform the user.
url:"192.168.0.54",//The URL of Bizerba WebAPI device:"GLPmaxx",//Device to be addressed message:"A!GD10|USD;-2;333"//BxNet command timeout: 15//Timeout in seconds for the request});
Multiple Commands
It is possible to send several commands in one. It is important to send these commands with LV01| .... |LX02 to enclose them.
let result =awaitapp.businessFunction({//Common Parameters for all functions functionName:"BizerbaSoap", methodName:"SendMessage", silentMode: false, //false is default. If set to true, the Gebra Suite will not show an error message box. it is up to you to inform the user.
url:"192.168.0.54",//The URL of Bizerba WebAPI device:"GLPmaxx",//Device to be addressed message:"A!LV01|GD02|lb;-3;222|GD10|USD;-2;333|LX02"//BxNet command timeout: 15//Timeout in seconds for the request});
Multiple Commands as an object array
In this case the control characters LV01| .... |LX02 are not necessary.
let result =awaitapp.businessFunction({//Common Parameters for all functions functionName:"BizerbaSoap", methodName:"SendMessage", silentMode: false, //false is default. If set to true, the Gebra Suite will not show an error message box. it is up to you to inform the user.
url:"192.168.0.54",//The URL of Bizerba WebAPI device:"GLPmaxx",//Device to be addressed message: [{"GD02":"lb;-3;222","GD10":"USD;-2;333" }],//BxNet command timeout:15//Timeout in seconds for the request});
Multiple Commands directly from a sqlRead result
In this case the control characters LV01| .... |LX02 are not necessary.
let bizerbaMessage =app.sqlRead("bizerbaMessageForItem", {itemId:4711});let result =awaitapp.businessFunction({//Common Parameters for all functions functionName:"BizerbaSoap", methodName:"SendMessage", silentMode: false, //false is default. If set to true, the Gebra Suite will not show an error message box. it is up to you to inform the user.
url:"192.168.0.54",//The URL of Bizerba WebAPI device:"GLPmaxx",//Device to be addressed message: bizerbaMessage,//BxNet command timeout:15//Timeout in seconds for the request});
Example Response
//This response has no follow up -> status = OK{"handle":"","response":"Q|A|G|D|12042023|T|16:09:23:666.16|H|1","status":"OK"}
//This response has a follow up -> status = Next//The response code can be used with the function ReceiveMessage{"handle":"","response":"Q|A|G|D|12042023|T|16:09:23:666.16|H|1","status":"Next"}