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

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