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.

12 lines
1.2 KiB

3 days ago
  1. import http from 'libs/http'
  2. export const debugControl = <T>(params: System.CmdControlParams<T>): Promise<null> => http.post('/debug/cmd', params)
  3. export const control = <T>(params: System.CmdControlParams<T>): Promise<null> => http.post('/cmd', params)
  4. export const getStatus = (): Promise<System.SystemStatus> => http.get('/device/device-status')
  5. export const getPoint = (motor: string): Promise<string> => http.get(`/motor/position/${motor}`)
  6. export const requireOutTray = (): Promise<{ moduleCode: string }[]> => http.get('/self-test/require-out-tray')
  7. export const setIgnoreItem = (params: { ignoreSelfTestType: string, ignore: boolean }): Promise<null> => http.post('/self-test/set-ignore-item', params)
  8. export const getTime = (): Promise<{ epochMilli: number }> => http.get('/sys/get-datetime')
  9. export const setTime = (params: { epochMilli?: number }): Promise<null> => http.post('/sys/set-datetime', params)
  10. export const configList = (params: System.Page = { pageNum: 1, pageSize: 999 }): Promise<System.PageResponse<System.SystemConfig>> => http.post('/system-config/list', params)
  11. export const updateConfig = (params: System.SystemConfig): Promise<number> => http.put('/system-config', params)