use of org.traccar.model.Command in project traccar by traccar.
the class Tk103ProtocolEncoderTest method testEncodeRebootDeviceAlternative.
@Test
public void testEncodeRebootDeviceAlternative() throws Exception {
Tk103ProtocolEncoder encoder = new Tk103ProtocolEncoder(true);
Command command = new Command();
command.setDeviceId(1);
command.setType(Command.TYPE_REBOOT_DEVICE);
assertEquals("[begin]sms2,88888888,[end]", encoder.encodeCommand(command));
}
use of org.traccar.model.Command in project traccar by traccar.
the class Tk103ProtocolEncoderTest method testEncodePositionSingle.
@Test
public void testEncodePositionSingle() throws Exception {
Tk103ProtocolEncoder encoder = new Tk103ProtocolEncoder();
Command command = new Command();
command.setDeviceId(1);
command.setType(Command.TYPE_POSITION_SINGLE);
assertEquals("(123456789012345AP00)", encoder.encodeCommand(command));
}
use of org.traccar.model.Command in project traccar by traccar.
the class Tk103ProtocolEncoderTest method testEncodePositionStop.
@Test
public void testEncodePositionStop() throws Exception {
Tk103ProtocolEncoder encoder = new Tk103ProtocolEncoder();
Command command = new Command();
command.setDeviceId(1);
command.setType(Command.TYPE_POSITION_STOP);
assertEquals("(123456789012345AR0000000000)", encoder.encodeCommand(command));
}
use of org.traccar.model.Command in project traccar by traccar.
the class Tk103ProtocolEncoderTest method testEncodeRebootDevice.
@Test
public void testEncodeRebootDevice() throws Exception {
Tk103ProtocolEncoder encoder = new Tk103ProtocolEncoder();
Command command = new Command();
command.setDeviceId(1);
command.setType(Command.TYPE_REBOOT_DEVICE);
assertEquals("(123456789012345AT00)", encoder.encodeCommand(command));
}
use of org.traccar.model.Command in project traccar by traccar.
the class Tk103ProtocolEncoderTest method testEncodeEngineStop.
@Test
public void testEncodeEngineStop() throws Exception {
Tk103ProtocolEncoder encoder = new Tk103ProtocolEncoder();
Command command = new Command();
command.setDeviceId(1);
command.setType(Command.TYPE_ENGINE_STOP);
assertEquals("(123456789012345AV010)", encoder.encodeCommand(command));
}
Aggregations