A_WriteData method
A_WriteData()
PURPOSE To output data immediately or send it to temporary area. SYNTAX int A_WriteData(int IsImmediate, String pbuf, int length); PARAMETER IsImmediate; 1 that the data should be sent immediately, and only the data in pbuf should be sent to the output port; 0 that the data is to be stored to the temporary area and will only be sent when aPrintOut() is called. pbuf; The data pointer to be sent. length; Length of pbuf data. RETURN 0 -> OK. Reference AW-Error.txt file. EXAMPLE Stringsznop1 = "nop_front\r\n"; String sznop2 = "nop_middle\r\n"; A_WriteData(0, sznop2, sznop1.length); A_WriteData(1, sznop1, sznop1.length); REMARK Any controls, commands or data that you wish to send to the printer can be sent via this function.
Implementation
int A_WriteData(
int IsImmediate,
String pbuf,
int length,
) {
return _A_WriteData(
IsImmediate,
pbuf.toNativeUtf8().cast<ffi.Int8>(),
length, // I could use pbuf.length here but would change manufacturer standard
);
}