Documentation ¶
Index ¶
Constants ¶
View Source
const ( SecondPrecision = "s" NanoPrecision = "ns" DeviceID = "deviceid" IntegerTime = "integer" StringTime = "string" Bool = "bool" Int16 = "int16" UInt16 = "uint16" Int32 = "int32" UInt32 = "uint32" Int64 = "int64" UInt64 = "uint64" Float32 = "float32" Float64 = "float64" String = "string" )
Variables ¶
View Source
var (
ErrWorkerNotExist = errors.New("worker not exist")
)
Functions ¶
This section is empty.
Types ¶
type Certificate ¶
type Config ¶
type Config struct { Devices []DeviceConfig `yaml:"devices" json:"devices"` Jobs []Job `yaml:"jobs" json:"jobs"` }
type Device ¶
type Device struct {
// contains filtered or unexported fields
}
func NewDevice ¶
func NewDevice(info *dm.DeviceInfo, cfg DeviceConfig) (*Device, error)
type DeviceConfig ¶
type DeviceConfig struct { ID byte `yaml:"id" json:"id"` Device string `yaml:"device" json:"device"` Endpoint string `yaml:"endpoint" json:"endpoint"` Timeout time.Duration `yaml:"timeout" json:"timeout" default:"10s"` Security Security `yaml:"security" json:"security"` Auth Auth `yaml:"auth" json:"auth"` Certificate Certificate `yaml:"certificate" json:"certificate"` }
type Job ¶
type Job struct { DeviceID byte `yaml:"deviceid" json:"deviceid"` Time Time `yaml:"time" json:"time" default:"{\"name\":\"time\", \"type\":\"integer\"}"` Interval time.Duration `yaml:"interval" json:"interval" default:"20s"` Properties []Property `yaml:"properties" json:"properties"` Publish Publish `yaml:"publish" json:"publish"` }
type Opcua ¶
type Opcua struct {
// contains filtered or unexported fields
}
func (*Opcua) DeltaCallback ¶
func (*Opcua) EventCallback ¶
Click to show internal directories.
Click to hide internal directories.