Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Calculator ¶
type DefaultDevice ¶
type Device ¶
type Device struct { Id string `json:"id" xorm:"pk"` Name string `json:"name,omitempty"` //名称 Desc string `json:"desc,omitempty"` //说明 TunnelId string `json:"tunnel_id"` //通道 ProductId string `json:"product_id"` //产品ID Slave uint `json:"slave"` //从站号 Disabled bool `json:"disabled"` Online bool `json:"online" xorm:"-"` Created time.Time `json:"created" xorm:"created"` }
type Mapper ¶
type Product ¶
type Product struct { Id string `json:"id" xorm:"pk"` Name string `json:"name,omitempty"` //名称 Desc string `json:"desc,omitempty"` //说明 //model.Product `xorm:"extends"` Mappers []Mapper `json:"mappers" xorm:"json"` Filters []Filter `json:"filters" xorm:"json"` Calculators []Calculator `json:"calculators" xorm:"json"` Created time.Time `json:"created" xorm:"created"` //创建时间 }
type Serial ¶
type Serial struct { Tunnel `xorm:"extends"` Retry `xorm:"extends"` SerialOptions `xorm:"extends"` }
type SerialOptions ¶
type SerialOptions struct { PortName string `json:"port_name,omitempty"` //port, e.g. COM1 "/dev/ttySerial1". BaudRate uint `json:"baud_rate,omitempty"` //9600 115200 DataBits uint `json:"data_bits,omitempty"` //5 6 7 8 StopBits uint `json:"stop_bits,omitempty"` //1 2 ParityMode int `json:"parity_mode,omitempty"` //0 1 2 NONE ODD EVEN }
type Server ¶
type Server struct { Tunnel `xorm:"extends"` Port uint16 `json:"port,omitempty"` //监听端口 Standalone bool `json:"standalone,omitempty"` //单例模式(不支持注册) Devices []DefaultDevice `json:"devices,omitempty" xorm:"json"` }
type Tunnel ¶
type Tunnel struct { Id string `json:"id,omitempty" xorm:"pk"` //ID Name string `json:"name,omitempty"` //名称 Desc string `json:"desc,omitempty"` //说明 Heartbeat string `json:"heartbeat,omitempty"` //心跳包 Protocol `xorm:"extends"` Poller `xorm:"extends"` Running bool `json:"running,omitempty" xorm:"-"` Disabled bool `json:"disabled"` Created time.Time `json:"created" xorm:"created"` //创建时间 }
Click to show internal directories.
Click to hide internal directories.