12 changed files with 104 additions and 123 deletions
-
2pom.xml
-
4src/main/java/com/dreamworks/boditech/BoditechApplication.java
-
9src/main/java/com/dreamworks/boditech/driver/Device.java
-
14src/main/java/com/dreamworks/boditech/driver/actuator/ActuatorBase.java
-
3src/main/java/com/dreamworks/boditech/driver/connection/ComWebsocketClient.java
-
6src/main/java/com/dreamworks/boditech/entity/WebsocketServerMessageErrorEvent.java
-
21src/main/java/com/dreamworks/boditech/service/WebsocketServerService.java
-
61src/main/java/com/dreamworks/boditech/utils/BoditechDeviceCmd.java
-
17src/main/resources/application-dev.yml
-
17src/main/resources/application-test.yml
-
15src/main/resources/application.yml
@ -0,0 +1,6 @@ |
|||
package com.dreamworks.boditech.entity; |
|||
public class WebsocketServerMessageErrorEvent { |
|||
public String type = "error"; |
|||
public String code; |
|||
public String message; |
|||
} |
@ -1,61 +0,0 @@ |
|||
package com.dreamworks.boditech.utils; |
|||
public class BoditechDeviceCmd { |
|||
public static final short[] MODULE_PING = {1, 0}; |
|||
public static final short[] MODULE_STOP = {1, 1}; |
|||
public static final short[] MODULE_BREAK = {1, 2}; |
|||
public static final short[] MODULE_GET_LAST_EXEC_STATUS = {1, 3}; |
|||
public static final short[] MODULE_GET_STATUS = {1, 4}; |
|||
public static final short[] MODULE_SET_REG = {1, 5}; |
|||
public static final short[] MODULE_GET_REG = {1, 6}; |
|||
public static final short[] MODULE_READIO = {1, 7}; |
|||
public static final short[] MODULE_WRITEIO = {1, 8}; |
|||
public static final short[] MODULE_READ_ADC = {1, 9}; |
|||
public static final short[] MODULE_GET_ERROR = {1, 10}; |
|||
public static final short[] MODULE_CLEAR_ERROR = {1, 11}; |
|||
public static final short[] MODULE_SET_INITED_FLAG = {1, 12}; |
|||
public static final short[] MODULE_GET_INITED_FLAG = {1, 13}; |
|||
public static final short[] MODULE_FACTORY_RESET = {1, 14}; |
|||
public static final short[] MODULE_FLUSH_CFG = {1, 15}; |
|||
public static final short[] MODULE_ACTIVE_CFG = {1, 16}; |
|||
public static final short[] MODULE_READ_RAW = {1, 19}; |
|||
public static final short[] MODULE_ENABLE = {1, 20}; |
|||
public static final short[] MODULE_START = {1, 21}; |
|||
|
|||
public static final short[] MOTOR_ENABLE = {2, 1}; |
|||
public static final short[] MOTOR_ROTATE = {2, 2}; |
|||
public static final short[] MOTOR_MOVE_BY = {2, 3}; |
|||
public static final short[] MOTOR_MOVE_TO = {2, 4}; |
|||
public static final short[] MOTOR_ROTATE_ACCTIME = {2, 5}; |
|||
public static final short[] MOTOR_MOVE_BY_ACCTIME = {2, 6}; |
|||
public static final short[] MOTOR_MOVE_TO_ACCTIME = {2, 7}; |
|||
public static final short[] MOTOR_ROTATE_WITH_TORQUE = {2, 8}; |
|||
public static final short[] MOTOR_MOVE_TO_ZERO_FORWARD = {2, 9}; |
|||
public static final short[] MOTOR_MOVE_TO_ZERO_BACKWARD = {2, 10}; |
|||
public static final short[] MOTOR_READ_POS = {2, 11}; |
|||
public static final short[] MOTOR_SET_CURRENT_POS_BY_CHANGE_SHIFT = {2, 12}; |
|||
public static final short[] MOTOR_MOVE_TO_ZERO_FORWARD_AND_CALCULATED_SHIFT = {2, 13}; |
|||
public static final short[] MOTOR_MOVE_TO_ZERO_BACKWARD_AND_CALCULATED_SHIFT = {2, 14}; |
|||
public static final short[] MOTOR_MOVE_TO_TORQUE = {2, 15}; |
|||
public static final short[] MOTOR_CALCULATED_POS_BY_MOVE_TO_ZERO = {2, 16}; |
|||
public static final short[] MOTOR_EASY_ROTATE = {2, 17}; |
|||
public static final short[] MOTOR_EASY_MOVE_BY = {2, 18}; |
|||
public static final short[] MOTOR_EASY_MOVE_TO = {2, 19}; |
|||
public static final short[] MOTOR_EASY_MOVE_TO_ZERO = {2, 20}; |
|||
public static final short[] MOTOR_EASY_SET_CURRENT_POS = {2, 21}; |
|||
|
|||
public static final short[] XYMOTOR_ENABLE = {3, 1}; |
|||
public static final short[] XYMOTOR_MOVE_BY = {3, 2}; |
|||
public static final short[] XYMOTOR_MOVE_TO = {3, 3}; |
|||
public static final short[] XYMOTOR_MOVE_TO_ZERO = {3, 4}; |
|||
public static final short[] XYMOTOR_MOVE_TO_ZERO_AND_CALCULATED_SHIFT = {3, 5}; |
|||
public static final short[] XYMOTOR_READ_POS = {3, 6}; |
|||
public static final short[] XYMOTOR_CALCULATED_POS_BY_MOVE_TO_ZERO = {3, 7}; |
|||
|
|||
public static final short[] CODE_SCANER_START_SCAN = {4, 1}; |
|||
public static final short[] CODE_SCANER_STOP_SCAN = {4, 2}; |
|||
public static final short[] CODE_SCANER_READ_SCANER_RESULT = {4, 3}; |
|||
|
|||
public static final short[] PIPETTE_CTRL_INIT_DEVICE = {5, 1}; |
|||
public static final short[] PIPETTE_CTRL_PUT_TIP = {5, 2}; |
|||
public static final short[] PIPETTE_CTRL_MOVE_TO_UL = {5, 3}; |
|||
} |
@ -0,0 +1,17 @@ |
|||
spring: |
|||
datasource: |
|||
url: jdbc:mysql://localhost:3306/boditech |
|||
username : root |
|||
password: 123456 |
|||
driver-class-name: com.mysql.cj.jdbc.Driver |
|||
|
|||
app: |
|||
device: |
|||
debug : true |
|||
connectionType : WebSocket # SerialPort, WebSocket |
|||
path : COM3 |
|||
baudrate : 921600 |
|||
wsuri : ws://192.168.8.10:19005 |
|||
|
|||
websocket: |
|||
port : 19006 |
@ -0,0 +1,17 @@ |
|||
spring: |
|||
datasource: |
|||
url: jdbc:mysql://localhost:3306/boditech |
|||
username : root |
|||
password: o0SXPBiWbtIGXOb3lfpJ9sVcG8ELNcha |
|||
driver-class-name: com.mysql.cj.jdbc.Driver |
|||
|
|||
app: |
|||
device: |
|||
debug : true |
|||
connectionType : WebSocket # SerialPort, WebSocket |
|||
path : COM3 |
|||
baudrate : 921600 |
|||
wsuri : ws://192.168.8.10:19005 |
|||
|
|||
websocket: |
|||
port : 19006 |
@ -1,14 +1,3 @@ |
|||
spring: |
|||
datasource: |
|||
url: jdbc:mysql://localhost:3306/boditech |
|||
username : root |
|||
password: 123456 |
|||
driver-class-name: com.mysql.cj.jdbc.Driver |
|||
|
|||
app: |
|||
device: |
|||
debug : true |
|||
connectionType : WebSocket # SerialPort, WebSocket |
|||
path : COM3 |
|||
baudrate : 921600 |
|||
wsuri : ws://192.168.8.10:19005 |
|||
profiles: |
|||
active: dev |
Write
Preview
Loading…
Cancel
Save
Reference in new issue