| 164 | } |
| 165 | |
| 166 | public class Dynamixel |
| 167 | { |
| 168 | LibFunction libFunction = (LibFunction)Native.loadLibrary("dxl_mac_c", LibFunction.class); |
| 169 | |
| 170 | // PortHandler functions |
| 171 | public int portHandler(String str) |
| 172 | { |
| 173 | return libFunction.portHandler(str); |
| 174 | } |
| 175 | |
| 176 | public Boolean openPort(int port_num) |
| 177 | { |
| 178 | return libFunction.openPort(port_num); |
| 179 | } |
| 180 | public void closePort(int port_num) |
| 181 | { |
| 182 | libFunction.closePort(port_num); |
| 183 | } |
| 184 | public void clearPort(int port_num) |
| 185 | { |
| 186 | libFunction.clearPort(port_num); |
| 187 | } |
| 188 | |
| 189 | public Boolean setBaudRate(int port_num, int baudrate) |
| 190 | { |
| 191 | return libFunction.setBaudRate(port_num, baudrate); |
| 192 | } |
| 193 | public int getBaudRate(int port_num) |
| 194 | { |
| 195 | return libFunction.getBaudRate(port_num); |
| 196 | } |
| 197 | |
| 198 | public int readPort(int port_num, byte[] packet, int length) |
| 199 | { |
| 200 | return libFunction.readPort(port_num, packet, length); |
| 201 | } |
| 202 | public int writePort(int port_num, byte[] packet, int length) |
| 203 | { |
| 204 | return libFunction.writePort(port_num, packet, length); |
| 205 | } |
| 206 | |
| 207 | public void setPacketTimeout(int port_num, short packet_length) |
| 208 | { |
| 209 | libFunction.setPacketTimeout(port_num, packet_length); |
| 210 | } |
| 211 | public void setPacketTimeoutMSec(int port_num, double msec) |
| 212 | { |
| 213 | libFunction.setPacketTimeoutMSec(port_num, msec); |
| 214 | } |
| 215 | public Boolean isPacketTimeout(int port_num) |
| 216 | { |
| 217 | return libFunction.isPacketTimeout(port_num); |
| 218 | } |
| 219 | |
| 220 | // PacketHandler functions |
| 221 | public void packetHandler() |
| 222 | { |
| 223 | libFunction.packetHandler(); |
nothing calls this directly
no outgoing calls
no test coverage detected