You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
999 B
36 lines
999 B
1 year ago
|
require("LTEModules/1xGen_Test")
|
||
|
require("LTEModules/idiBusFormatter")
|
||
|
require("LTEModules/idiBusCommon")
|
||
|
|
||
|
-- Line 0
|
||
|
ibController = IdiBusController{device = "COM1", baudrate = 115200}
|
||
|
-- Line 1
|
||
|
--ibController = IdiBusController(device = "COM2", baudrate = 115200)
|
||
|
|
||
|
showIbPacket(StartTest_1xGen{controller = ibController, address = 2})
|
||
|
|
||
|
------------------------------------------------------------------------------------------------------
|
||
|
require("LTEModules/idiBusFormatter")
|
||
|
require("LTEModules/idiBusCommon")
|
||
|
|
||
|
iBController1 = IdiBusController
|
||
|
{
|
||
|
-- Line 0
|
||
|
device="COM1",
|
||
|
-- Line 1
|
||
|
--device = "COM2",
|
||
|
baudrate=115200
|
||
|
}
|
||
|
exampleRawIbPacket = {
|
||
|
address=2,
|
||
|
mmps=0x04,
|
||
|
dev=0,
|
||
|
channel=0,
|
||
|
comFunc=0,
|
||
|
data=byteArray({0x01, 0x4E, 0x20, 0x28, 0x01, 0x00, 0x01, 0x9C, 0x40, 0x28, 0x01, 0x01})
|
||
|
}
|
||
|
local answer
|
||
|
iBController1:sendMasterMessage(exampleRawIbPacket)
|
||
|
answer = iBController1:getBufferAsBytes()
|
||
|
Logger:printLine("Answer:")
|
||
|
Logger:printLineAsHex(answer); Logger:print("\n")
|