v1

package
v1.12.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 21, 2024 License: Apache-2.0 Imports: 20 Imported by: 5

Documentation

Index

Constants

View Source
const (
	ServiceTypeCommandStation = "_cs._binkynet._tcp"
	ServiceTypeLogProvider    = "_lp._binkynet._tcp"
	ServiceTypeLokiProvider   = "_lokip._binkynet._tcp"
	ServiceTypeNetworkControl = "_nwctrl._binkynet._tcp"
)
View Source
const GlobalModuleID = "GLOBAL"

GlobalModuleID defines the module part of an ObjectAddress for addresses that are independent of specific modules.

Variables

View Source
var (
	ErrInvalidLengthDiscovery        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowDiscovery          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupDiscovery = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthLogprovider        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowLogprovider          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupLogprovider = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthNetwork        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowNetwork          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupNetwork = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthTypes        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTypes          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group")
)
View Source
var Cause = func(err error) error { return err }

Cause is the cause function used by the error helpers in this module.

View Source
var LocDirection_name = map[int32]string{
	0: "FORWARD",
	1: "REVERSE",
}
View Source
var LocDirection_value = map[string]int32{
	"FORWARD": 0,
	"REVERSE": 1,
}
View Source
var LogLevel_name = map[int32]string{
	0: "TRACE",
	1: "DEBUG",
	2: "INFO",
	3: "WARNING",
	4: "ERROR",
	5: "FATAL",
}
View Source
var LogLevel_value = map[string]int32{
	"TRACE":   0,
	"DEBUG":   1,
	"INFO":    2,
	"WARNING": 3,
	"ERROR":   4,
	"FATAL":   5,
}
View Source
var SwitchDirection_name = map[int32]string{
	0: "STRAIGHT",
	1: "OFF",
}
View Source
var SwitchDirection_value = map[string]int32{
	"STRAIGHT": 0,
	"OFF":      1,
}
View Source
var TimePeriod_name = map[int32]string{
	0: "MORNING",
	1: "AFTERNOON",
	2: "EVENING",
	3: "NIGHT",
}
View Source
var TimePeriod_value = map[string]int32{
	"MORNING":   0,
	"AFTERNOON": 1,
	"EVENING":   2,
	"NIGHT":     3,
}

Functions

func AlreadyExists

func AlreadyExists(msg string, args ...interface{}) error

AlreadyExists creates a new error that signals a request to create an object that already exists.

func Canceled

func Canceled(msg string, args ...interface{}) error

Canceled creates a new error that signals a request that was canceled. Typically by the caller.

func CreateHostID

func CreateHostID() (string, error)

CreateHostID creates a host ID based on network hardware addresses.

func DeadlineExceeded

func DeadlineExceeded(msg string, args ...interface{}) error

DeadlineExceeded creates a new error that signals a request that timed out.

func GetServiceInfoHost added in v0.2.2

func GetServiceInfoHost(ctx context.Context) (string, bool)

GetServiceInfoHost gets the configured host to use for ServiceInfo's from the given context.

func InvalidArgument

func InvalidArgument(msg string, args ...interface{}) error

InvalidArgument creates a new error that signals a request with invalid arguments.

func IsAlreadyExists

func IsAlreadyExists(err error) bool

IsAlreadyExists returns true if the given error signals a request to create an object that already exists.

func IsCanceled

func IsCanceled(err error) bool

IsCanceled returns true if the given error signals a request that was canceled. Typically by the caller.

func IsDeadlineExceeded

func IsDeadlineExceeded(err error) bool

IsDeadlineExceeded returns true if the given error signals a request that timed out.

func IsInvalidArgument

func IsInvalidArgument(err error) bool

IsInvalidArgument returns true if the given error signals a request with invalid arguments.

func IsNotFound

func IsNotFound(err error) bool

IsNotFound returns true if the given error signals a request to an object that is not found.

func IsPermissionDenied

func IsPermissionDenied(err error) bool

IsPermissionDenied returns true if the given error signals a request that the caller has not enough permissions for.

func IsPreconditionFailed

func IsPreconditionFailed(err error) bool

IsPreconditionFailed returns true if the given error signals a precondition of the request has failed.

func IsUnauthenticated

func IsUnauthenticated(err error) bool

IsUnauthenticated returns true if the given error signals an unauthenticated request.

func IsUnknown

func IsUnknown(err error) bool

IsUnknown returns true if the given error signals an unknown error.

func NotFound

func NotFound(msg string, args ...interface{}) error

NotFound creates a new error that signals a request to an object that is not found.

func PermissionDenied

func PermissionDenied(msg string, args ...interface{}) error

PermissionDenied creates a new error that signals a request that the caller has not enough permissions for.

func PreconditionFailed

func PreconditionFailed(msg string, args ...interface{}) error

PreconditionFailed creates a new error that signals a request that a precondition of the call has failed.

func RegisterCommandStationServiceServer

func RegisterCommandStationServiceServer(s *grpc.Server, srv CommandStationServiceServer)

func RegisterLocalWorkerServiceServer added in v1.10.0

func RegisterLocalWorkerServiceServer(s *grpc.Server, srv LocalWorkerServiceServer)

func RegisterLogProviderServiceServer

func RegisterLogProviderServiceServer(s *grpc.Server, srv LogProviderServiceServer)

func RegisterNetworkControlServiceServer

func RegisterNetworkControlServiceServer(s *grpc.Server, srv NetworkControlServiceServer)

func RegisterServiceEntry

func RegisterServiceEntry(ctx context.Context, serviceType string, info ServiceInfo) error

RegisterServiceEntry runs a registration service for the given service entry until the given context is canceled.

func SplitAddress

func SplitAddress(input ObjectAddress) (module, local string, err error)

SplitAddress splits an address string into its components.

func Unauthenticated

func Unauthenticated(msg string, args ...interface{}) error

Unauthenticated creates a new error that signals an unauthenticated request.

func Unknown

func Unknown(msg string, args ...interface{}) error

Unknown creates a new error that signals an unknown error.

func WithServiceInfoHost added in v0.2.2

func WithServiceInfoHost(ctx context.Context, host string) context.Context

WithServiceInfoHost configures the given given to use the given host for ServiceInfo's.

Types

type CauseFunc

type CauseFunc = func(error) error

CauseFunc specifies the prototype of a function that must return the cause of the given error. If there is not underlying cause, the given error itself must be retured. If nil is passed, nil must be returned.

type Clock

type Clock struct {
	// Current time period.
	Period TimePeriod `protobuf:"varint,1,opt,name=period,proto3,enum=binkynet.v1.TimePeriod" json:"period,omitempty"`
	// Current hours (0..23)
	Hours int32 `protobuf:"varint,2,opt,name=hours,proto3" json:"hours,omitempty"`
	// Current minutes (0..59)
	Minutes int32 `protobuf:"varint,3,opt,name=minutes,proto3" json:"minutes,omitempty"`
	// Current realworld time in seconds elapsed since January 1, 1970 UTC
	Unixtime             int64    `protobuf:"varint,4,opt,name=unixtime,proto3" json:"unixtime,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Clock is used to identity global time.

func (*Clock) Clone

func (s *Clock) Clone() *Clock

Clone the entire object

func (*Clock) Descriptor

func (*Clock) Descriptor() ([]byte, []int)

func (*Clock) Equal

func (s *Clock) Equal(o *Clock) bool

Equal returns true when both objects have the same values.

func (*Clock) GetHours

func (m *Clock) GetHours() int32

func (*Clock) GetMinutes

func (m *Clock) GetMinutes() int32

func (*Clock) GetPeriod

func (m *Clock) GetPeriod() TimePeriod

func (*Clock) GetUnixtime added in v1.0.0

func (m *Clock) GetUnixtime() int64

func (*Clock) Marshal

func (m *Clock) Marshal() (dAtA []byte, err error)

func (*Clock) MarshalTo

func (m *Clock) MarshalTo(dAtA []byte) (int, error)

func (*Clock) MarshalToSizedBuffer

func (m *Clock) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Clock) ProtoMessage

func (*Clock) ProtoMessage()

func (*Clock) Reset

func (m *Clock) Reset()

func (*Clock) Size

func (m *Clock) Size() (n int)

func (*Clock) String

func (m *Clock) String() string

func (*Clock) Unmarshal

func (m *Clock) Unmarshal(dAtA []byte) error

func (*Clock) XXX_DiscardUnknown

func (m *Clock) XXX_DiscardUnknown()

func (*Clock) XXX_Marshal

func (m *Clock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Clock) XXX_Merge

func (m *Clock) XXX_Merge(src proto.Message)

func (*Clock) XXX_Size

func (m *Clock) XXX_Size() int

func (*Clock) XXX_Unmarshal

func (m *Clock) XXX_Unmarshal(b []byte) error

type CommandStationInfo

type CommandStationInfo struct {
	// Unique identifier of the command station
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Human readable description of the command station
	Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	// Version of the command station in semantic versioning format.
	// E.g. 1.0.4
	Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"`
	// Uptime of the command station in seconds.
	Uptime               int64    `protobuf:"varint,4,opt,name=uptime,proto3" json:"uptime,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Information about the command station

func (*CommandStationInfo) Descriptor

func (*CommandStationInfo) Descriptor() ([]byte, []int)

func (*CommandStationInfo) GetDescription

func (m *CommandStationInfo) GetDescription() string

func (*CommandStationInfo) GetId

func (m *CommandStationInfo) GetId() string

func (*CommandStationInfo) GetUptime

func (m *CommandStationInfo) GetUptime() int64

func (*CommandStationInfo) GetVersion

func (m *CommandStationInfo) GetVersion() string

func (*CommandStationInfo) Marshal

func (m *CommandStationInfo) Marshal() (dAtA []byte, err error)

func (*CommandStationInfo) MarshalTo

func (m *CommandStationInfo) MarshalTo(dAtA []byte) (int, error)

func (*CommandStationInfo) MarshalToSizedBuffer

func (m *CommandStationInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*CommandStationInfo) ProtoMessage

func (*CommandStationInfo) ProtoMessage()

func (*CommandStationInfo) Reset

func (m *CommandStationInfo) Reset()

func (*CommandStationInfo) Size

func (m *CommandStationInfo) Size() (n int)

func (*CommandStationInfo) String

func (m *CommandStationInfo) String() string

func (*CommandStationInfo) Unmarshal

func (m *CommandStationInfo) Unmarshal(dAtA []byte) error

func (*CommandStationInfo) XXX_DiscardUnknown

func (m *CommandStationInfo) XXX_DiscardUnknown()

func (*CommandStationInfo) XXX_Marshal

func (m *CommandStationInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CommandStationInfo) XXX_Merge

func (m *CommandStationInfo) XXX_Merge(src proto.Message)

func (*CommandStationInfo) XXX_Size

func (m *CommandStationInfo) XXX_Size() int

func (*CommandStationInfo) XXX_Unmarshal

func (m *CommandStationInfo) XXX_Unmarshal(b []byte) error

type CommandStationServiceClient

type CommandStationServiceClient interface {
	// GetInfo returns information from the command station.
	GetInfo(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*CommandStationInfo, error)
	// Power is used to send power requests and receive power request & actual changes.
	Power(ctx context.Context, opts ...grpc.CallOption) (CommandStationService_PowerClient, error)
	// Locs is used to control locs and get changes in loc requests & actual state back.
	// Note: Loc.actual on incoming objects is ignored.
	Locs(ctx context.Context, opts ...grpc.CallOption) (CommandStationService_LocsClient, error)
}

CommandStationServiceClient is the client API for CommandStationService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewCommandStationServiceClient

func NewCommandStationServiceClient(cc *grpc.ClientConn) CommandStationServiceClient

type CommandStationServiceServer

type CommandStationServiceServer interface {
	// GetInfo returns information from the command station.
	GetInfo(context.Context, *Empty) (*CommandStationInfo, error)
	// Power is used to send power requests and receive power request & actual changes.
	Power(CommandStationService_PowerServer) error
	// Locs is used to control locs and get changes in loc requests & actual state back.
	// Note: Loc.actual on incoming objects is ignored.
	Locs(CommandStationService_LocsServer) error
}

CommandStationServiceServer is the server API for CommandStationService service.

type CommandStationService_LocsClient added in v0.2.2

type CommandStationService_LocsClient interface {
	Send(*Loc) error
	Recv() (*Loc, error)
	grpc.ClientStream
}

type CommandStationService_LocsServer added in v0.2.2

type CommandStationService_LocsServer interface {
	Send(*Loc) error
	Recv() (*Loc, error)
	grpc.ServerStream
}

type CommandStationService_PowerClient added in v0.2.2

type CommandStationService_PowerClient interface {
	Send(*PowerState) error
	Recv() (*Power, error)
	grpc.ClientStream
}

type CommandStationService_PowerServer added in v0.2.2

type CommandStationService_PowerServer interface {
	Send(*Power) error
	Recv() (*PowerState, error)
	grpc.ServerStream
}

type ConfigKey added in v0.6.2

type ConfigKey string

ConfigKey is a strongly typed well known key of a configuration entry of a connection of an object type.

const (
	// ConfigKeyDebug turns on/off debugging information for a specific object.
	// Values are true|false|0|1.
	ConfigKeyDebug ConfigKey = "debug"
	// ConfigKeyServoStraight configures the servo value for the "straight" switch position.
	ConfigKeyServoStraight ConfigKey = "straight"
	// ConfigKeyServoOff configures the servo value for the "off" switch position.
	ConfigKeyServoOff ConfigKey = "off"
	// ConfigKeyServoStep configures the step size for a servo transition from "straight" to "off" position.
	ConfigKeyServoStep ConfigKey = "step"
	// ConfigKeyInvert configures the inversion setting of an i/o pin.
	// Values are true|false|0|1.
	ConfigKeyInvert ConfigKey = "invert"
	// ConfigKeyPulse configures the length of the pulse (for relays) in ms.
	ConfigKeyPulse ConfigKey = "pulse"
	// ConfigKeyThreshold configures the threshold for measured analog values
	// above which a sensor is considered "on".
	ConfigKeyThreshold ConfigKey = "threshold"
)

func AllConfigKeys added in v0.6.2

func AllConfigKeys() []ConfigKey

func (ConfigKey) DefaultValue added in v0.6.2

func (key ConfigKey) DefaultValue() string

DefaultValue returns the default value for a given configuration key.

func (ConfigKey) ValidateValue added in v0.6.2

func (key ConfigKey) ValidateValue(value string) error

ValidateValue validates a given value for a given configuration key.

type Connection

type Connection struct {
	// Key is specific to the type of device.
	Key ConnectionName `protobuf:"bytes,1,opt,name=key,proto3,customtype=ConnectionName" json:"key"`
	// Pins of devices to connect to
	Pins []*DevicePin `protobuf:"bytes,2,rep,name=pins,proto3" json:"pins,omitempty"`
	// Optional configuration for this connection.
	// Keys & values are specific to the connection name.
	Configuration        map[ConfigKey]string `` /* 185-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
	XXX_unrecognized     []byte               `json:"-"`
	XXX_sizecache        int32                `json:"-"`
}

Connection from an Object to a Device.

func (*Connection) Clone added in v1.0.0

func (s *Connection) Clone() *Connection

Clone the entire object

func (*Connection) Descriptor

func (*Connection) Descriptor() ([]byte, []int)

func (*Connection) Equal added in v0.11.1

func (s *Connection) Equal(o *Connection) bool

Equal returns true when both objects have the same values.

func (Connection) GetBoolConfig

func (c Connection) GetBoolConfig(key ConfigKey) bool

GetBoolConfig returns the bool-typed configuration value for the given key. If not found or not an int, the default value for the key is returned.

func (*Connection) GetConfiguration

func (m *Connection) GetConfiguration() map[ConfigKey]string

func (Connection) GetIntConfig

func (c Connection) GetIntConfig(key ConfigKey) int

GetIntConfig returns the int-typed configuration value for the given key. If not found or not an int, the default value for the key is returned.

func (*Connection) GetKey

func (s *Connection) GetKey() ConnectionName

GetKey returns the key of the object in a safe manor

func (*Connection) GetPins

func (m *Connection) GetPins() []*DevicePin

func (Connection) GetStringConfig

func (c Connection) GetStringConfig(key ConfigKey) string

GetStringConfig returns the configuration value for the given key. If not found, the default value for the key is returned.

func (*Connection) HashTo added in v1.0.0

func (s *Connection) HashTo(h hash.Hash)

HashTo appends the connection into to the given hash.

func (*Connection) Marshal

func (m *Connection) Marshal() (dAtA []byte, err error)

func (*Connection) MarshalTo

func (m *Connection) MarshalTo(dAtA []byte) (int, error)

func (*Connection) MarshalToSizedBuffer

func (m *Connection) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Connection) ProtoMessage

func (*Connection) ProtoMessage()

func (*Connection) Reset

func (m *Connection) Reset()

func (*Connection) Size

func (m *Connection) Size() (n int)

func (*Connection) String

func (m *Connection) String() string

func (*Connection) Unmarshal

func (m *Connection) Unmarshal(dAtA []byte) error

func (*Connection) XXX_DiscardUnknown

func (m *Connection) XXX_DiscardUnknown()

func (*Connection) XXX_Marshal

func (m *Connection) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Connection) XXX_Merge

func (m *Connection) XXX_Merge(src proto.Message)

func (*Connection) XXX_Size

func (m *Connection) XXX_Size() int

func (*Connection) XXX_Unmarshal

func (m *Connection) XXX_Unmarshal(b []byte) error

type ConnectionName

type ConnectionName string

ConnectionName is a strongly typed well known know of a connection of an object type.

const (
	ConnectionNameSensor             ConnectionName = "sensor"
	ConnectionNameOutput             ConnectionName = "output"
	ConnectionNameServo              ConnectionName = "servo"
	ConnectionNameStraightRelay      ConnectionName = "straight-relay"
	ConnectionNameOffRelay           ConnectionName = "off-relay"
	ConnectionNamePhaseStraightRelay ConnectionName = "phase-straight-relay"
	ConnectionNamePhaseOffRelay      ConnectionName = "phase-off-relay"
	ConnectionNameRelayOutAInA       ConnectionName = "relay-out-a-in-a"
	ConnectionNameRelayOutBInA       ConnectionName = "relay-out-b-in-a"
	ConnectionNameRelayOutAInB       ConnectionName = "relay-out-a-in-b"
	ConnectionNameRelayOutBInB       ConnectionName = "relay-out-b-in-b"
	ConnectionNameMagneticStraightA  ConnectionName = "magnetic-straight-a"
	ConnectionNameMagneticStraightB  ConnectionName = "magnetic-straight-b"
	ConnectionNameMagneticOffA       ConnectionName = "magnetic-off-a"
	ConnectionNameMagneticOffB       ConnectionName = "magnetic-off-b"
)

func AllConnectionNames added in v0.2.2

func AllConnectionNames() []ConnectionName

func (ConnectionName) ExpectedConfigurations added in v0.8.1

func (ot ConnectionName) ExpectedConfigurations() ([]ConfigKey, []ConfigKey)

ExpectedConfigurations returns the configuration keys that are expected for a connection with given name. Returns: Required keys, Optional keys

func (ConnectionName) ExpectedPins added in v0.6.1

func (name ConnectionName) ExpectedPins() int

ExpectedPins returns the expected number of pins for a connection with given name

type Device

type Device struct {
	// ID of the device
	Id DeviceID `protobuf:"bytes,1,opt,name=id,proto3,customtype=DeviceID" json:"id"`
	// Type of the device.
	// See devicetypes.go
	Type DeviceType `protobuf:"bytes,2,opt,name=type,proto3,customtype=DeviceType" json:"type"`
	// Logical address of the device on the local worker.
	Address              string   `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Device represents a hardware device such as a I2C chip.

func (*Device) Clone added in v1.0.0

func (s *Device) Clone() *Device

Clone the entire object

func (*Device) Descriptor

func (*Device) Descriptor() ([]byte, []int)

func (*Device) Equal added in v0.11.1

func (s *Device) Equal(o *Device) bool

Equal returns true when both objects have the same values.

func (*Device) GetAddress

func (m *Device) GetAddress() string

func (*Device) GetId

func (s *Device) GetId() DeviceID

GetId returns the id of the object in a safe manor

func (*Device) GetType

func (s *Device) GetType() DeviceType

GetType returns the type of the object in a safe manor

func (*Device) HashTo added in v1.0.0

func (s *Device) HashTo(h hash.Hash)

HashTo appends the device into to the given hash.

func (*Device) Marshal

func (m *Device) Marshal() (dAtA []byte, err error)

func (*Device) MarshalTo

func (m *Device) MarshalTo(dAtA []byte) (int, error)

func (*Device) MarshalToSizedBuffer

func (m *Device) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Device) ProtoMessage

func (*Device) ProtoMessage()

func (*Device) Reset

func (m *Device) Reset()

func (*Device) Size

func (m *Device) Size() (n int)

func (*Device) String

func (m *Device) String() string

func (*Device) Unmarshal

func (m *Device) Unmarshal(dAtA []byte) error

func (Device) Validate

func (d Device) Validate() error

Validate the given configuration, returning nil on ok, or an error upon validation issues.

func (*Device) XXX_DiscardUnknown

func (m *Device) XXX_DiscardUnknown()

func (*Device) XXX_Marshal

func (m *Device) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Device) XXX_Merge

func (m *Device) XXX_Merge(src proto.Message)

func (*Device) XXX_Size

func (m *Device) XXX_Size() int

func (*Device) XXX_Unmarshal

func (m *Device) XXX_Unmarshal(b []byte) error

type DeviceDiscovery added in v1.0.0

type DeviceDiscovery struct {
	// ID of the module to perform the request on
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Requested state of the discovery
	Request *DiscoverRequest `protobuf:"bytes,2,opt,name=request,proto3" json:"request,omitempty"`
	// Actual state of the discovery
	Actual               *DiscoverResult `protobuf:"bytes,3,opt,name=actual,proto3" json:"actual,omitempty"`
	XXX_NoUnkeyedLiteral struct{}        `json:"-"`
	XXX_unrecognized     []byte          `json:"-"`
	XXX_sizecache        int32           `json:"-"`
}

Request to discover devices on a local worker

func (*DeviceDiscovery) Clone added in v1.0.0

func (s *DeviceDiscovery) Clone() *DeviceDiscovery

Clone the entire object

func (*DeviceDiscovery) Descriptor added in v1.0.0

func (*DeviceDiscovery) Descriptor() ([]byte, []int)

func (*DeviceDiscovery) GetActual added in v1.0.0

func (m *DeviceDiscovery) GetActual() *DiscoverResult

func (*DeviceDiscovery) GetId added in v1.0.0

func (m *DeviceDiscovery) GetId() string

func (*DeviceDiscovery) GetRequest added in v1.0.0

func (m *DeviceDiscovery) GetRequest() *DiscoverRequest

func (*DeviceDiscovery) Marshal added in v1.0.0

func (m *DeviceDiscovery) Marshal() (dAtA []byte, err error)

func (*DeviceDiscovery) MarshalTo added in v1.0.0

func (m *DeviceDiscovery) MarshalTo(dAtA []byte) (int, error)

func (*DeviceDiscovery) MarshalToSizedBuffer added in v1.0.0

func (m *DeviceDiscovery) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*DeviceDiscovery) ProtoMessage added in v1.0.0

func (*DeviceDiscovery) ProtoMessage()

func (*DeviceDiscovery) Reset added in v1.0.0

func (m *DeviceDiscovery) Reset()

func (*DeviceDiscovery) Size added in v1.0.0

func (m *DeviceDiscovery) Size() (n int)

func (*DeviceDiscovery) String added in v1.0.0

func (m *DeviceDiscovery) String() string

func (*DeviceDiscovery) Unmarshal added in v1.0.0

func (m *DeviceDiscovery) Unmarshal(dAtA []byte) error

func (*DeviceDiscovery) XXX_DiscardUnknown added in v1.0.0

func (m *DeviceDiscovery) XXX_DiscardUnknown()

func (*DeviceDiscovery) XXX_Marshal added in v1.0.0

func (m *DeviceDiscovery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DeviceDiscovery) XXX_Merge added in v1.0.0

func (m *DeviceDiscovery) XXX_Merge(src proto.Message)

func (*DeviceDiscovery) XXX_Size added in v1.0.0

func (m *DeviceDiscovery) XXX_Size() int

func (*DeviceDiscovery) XXX_Unmarshal added in v1.0.0

func (m *DeviceDiscovery) XXX_Unmarshal(b []byte) error

type DeviceID

type DeviceID string

DeviceID is a strongly typed identifier of a device.

type DeviceIndex

type DeviceIndex uint

DeviceIndex is an address local to a device. Range 1..

type DevicePin

type DevicePin struct {
	// Unique identifier of the device that this connection refers to.
	DeviceId DeviceID `protobuf:"bytes,1,opt,name=device_id,json=deviceId,proto3,customtype=DeviceID" json:"device"`
	// Index on the device (1...)
	Index                DeviceIndex `protobuf:"varint,2,opt,name=index,proto3,customtype=DeviceIndex" json:"index"`
	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
	XXX_unrecognized     []byte      `json:"-"`
	XXX_sizecache        int32       `json:"-"`
}

DevicePin identifies a hardware device and an index within that hardware address.

func (*DevicePin) Clone added in v1.0.0

func (s *DevicePin) Clone() *DevicePin

Clone the entire object

func (*DevicePin) Descriptor

func (*DevicePin) Descriptor() ([]byte, []int)

func (*DevicePin) Equal added in v0.11.1

func (s *DevicePin) Equal(o *DevicePin) bool

Equal returns true when both objects have the same values.

func (*DevicePin) GetDeviceId

func (s *DevicePin) GetDeviceId() DeviceID

GetDeviceId returns the device-id of the object in a safe manor

func (*DevicePin) GetDeviceIndex

func (s *DevicePin) GetDeviceIndex() DeviceIndex

GetDeviceIndex returns the index of the object in a safe manor

func (*DevicePin) HashTo added in v1.0.0

func (s *DevicePin) HashTo(h hash.Hash)

HashTo appends the pin into to the given hash.

func (*DevicePin) Marshal

func (m *DevicePin) Marshal() (dAtA []byte, err error)

func (*DevicePin) MarshalTo

func (m *DevicePin) MarshalTo(dAtA []byte) (int, error)

func (*DevicePin) MarshalToSizedBuffer

func (m *DevicePin) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*DevicePin) ProtoMessage

func (*DevicePin) ProtoMessage()

func (*DevicePin) Reset

func (m *DevicePin) Reset()

func (*DevicePin) Size

func (m *DevicePin) Size() (n int)

func (*DevicePin) String

func (m *DevicePin) String() string

func (*DevicePin) Unmarshal

func (m *DevicePin) Unmarshal(dAtA []byte) error

func (*DevicePin) XXX_DiscardUnknown

func (m *DevicePin) XXX_DiscardUnknown()

func (*DevicePin) XXX_Marshal

func (m *DevicePin) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DevicePin) XXX_Merge

func (m *DevicePin) XXX_Merge(src proto.Message)

func (*DevicePin) XXX_Size

func (m *DevicePin) XXX_Size() int

func (*DevicePin) XXX_Unmarshal

func (m *DevicePin) XXX_Unmarshal(b []byte) error

type DeviceType

type DeviceType string

DeviceType identifies a type of devices (typically chip name)

const (
	// DeviceTypeMCP23008 is the device type of a General Purpose I/O
	DeviceTypeMCP23008 DeviceType = "mcp23008"
	// DeviceTypeMCP23017 is the device type of a General Purpose I/O
	DeviceTypeMCP23017 DeviceType = "mcp23017"
	// DeviceTypePCA9685 is the device type of a Pulse Width Modulation device
	DeviceTypePCA9685 DeviceType = "pca9685"
	// DeviceTypePCF8574 is the device type of a General Purpose I/O
	DeviceTypePCF8574 DeviceType = "pcf8574"
	// DeviceTypeADS1115 is the device type of a A/D conversion
	DeviceTypeADS1115 DeviceType = "ads1115"
	// DeviceTypeBinkyCarSensor is the device type of a BinkyCar sensor
	// https://easyeda.com/editor?from=oshwlab#id=4b79ca953a7e4ea8971153b438ae1339|5964111c75b2459481dac75f8581f77e
	DeviceTypeBinkyCarSensor DeviceType = "binkyCarSensor"
)

func AllDeviceTypes added in v0.2.2

func AllDeviceTypes() []DeviceType

AllDeviceTypes returns all possible device types.

func (DeviceType) Validate

func (t DeviceType) Validate() error

Validate the given type, returning nil on ok, or an error upon validation issues.

type DiscoverRequest added in v0.4.0

type DiscoverRequest struct {
	// Unique ID of the request
	RequestId            int32    `protobuf:"varint,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

DiscoverRequest is sent when the netmanager wants to local worker to probe its locally attached devices.

func (*DiscoverRequest) Clone added in v1.0.0

func (s *DiscoverRequest) Clone() *DiscoverRequest

Clone the entire object

func (*DiscoverRequest) Descriptor added in v0.4.0

func (*DiscoverRequest) Descriptor() ([]byte, []int)

func (*DiscoverRequest) GetRequestId added in v1.0.0

func (m *DiscoverRequest) GetRequestId() int32

func (*DiscoverRequest) Marshal added in v0.4.0

func (m *DiscoverRequest) Marshal() (dAtA []byte, err error)

func (*DiscoverRequest) MarshalTo added in v0.4.0

func (m *DiscoverRequest) MarshalTo(dAtA []byte) (int, error)

func (*DiscoverRequest) MarshalToSizedBuffer added in v0.4.0

func (m *DiscoverRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*DiscoverRequest) ProtoMessage added in v0.4.0

func (*DiscoverRequest) ProtoMessage()

func (*DiscoverRequest) Reset added in v0.4.0

func (m *DiscoverRequest) Reset()

func (*DiscoverRequest) Size added in v0.4.0

func (m *DiscoverRequest) Size() (n int)

func (*DiscoverRequest) String added in v0.4.0

func (m *DiscoverRequest) String() string

func (*DiscoverRequest) Unmarshal added in v0.4.0

func (m *DiscoverRequest) Unmarshal(dAtA []byte) error

func (*DiscoverRequest) XXX_DiscardUnknown added in v0.4.0

func (m *DiscoverRequest) XXX_DiscardUnknown()

func (*DiscoverRequest) XXX_Marshal added in v0.4.0

func (m *DiscoverRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DiscoverRequest) XXX_Merge added in v0.4.0

func (m *DiscoverRequest) XXX_Merge(src proto.Message)

func (*DiscoverRequest) XXX_Size added in v0.4.0

func (m *DiscoverRequest) XXX_Size() int

func (*DiscoverRequest) XXX_Unmarshal added in v0.4.0

func (m *DiscoverRequest) XXX_Unmarshal(b []byte) error

type DiscoverResult added in v0.5.0

type DiscoverResult struct {
	// ID of local worker
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// The addresses that were found
	Addresses            []string `protobuf:"bytes,2,rep,name=addresses,proto3" json:"addresses,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

DiscoverResult is returned in a response to a discover request by the netmanager.

func (*DiscoverResult) Clone added in v1.0.0

func (s *DiscoverResult) Clone() *DiscoverResult

Clone the entire object

func (*DiscoverResult) Descriptor added in v0.5.0

func (*DiscoverResult) Descriptor() ([]byte, []int)

func (*DiscoverResult) GetAddresses added in v0.5.0

func (m *DiscoverResult) GetAddresses() []string

func (*DiscoverResult) GetId added in v0.6.0

func (m *DiscoverResult) GetId() string

func (*DiscoverResult) Marshal added in v0.5.0

func (m *DiscoverResult) Marshal() (dAtA []byte, err error)

func (*DiscoverResult) MarshalTo added in v0.5.0

func (m *DiscoverResult) MarshalTo(dAtA []byte) (int, error)

func (*DiscoverResult) MarshalToSizedBuffer added in v0.5.0

func (m *DiscoverResult) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*DiscoverResult) ProtoMessage added in v0.5.0

func (*DiscoverResult) ProtoMessage()

func (*DiscoverResult) Reset added in v0.5.0

func (m *DiscoverResult) Reset()

func (*DiscoverResult) Size added in v0.5.0

func (m *DiscoverResult) Size() (n int)

func (*DiscoverResult) String added in v0.5.0

func (m *DiscoverResult) String() string

func (*DiscoverResult) Unmarshal added in v0.5.0

func (m *DiscoverResult) Unmarshal(dAtA []byte) error

func (*DiscoverResult) XXX_DiscardUnknown added in v0.5.0

func (m *DiscoverResult) XXX_DiscardUnknown()

func (*DiscoverResult) XXX_Marshal added in v0.5.0

func (m *DiscoverResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DiscoverResult) XXX_Merge added in v0.5.0

func (m *DiscoverResult) XXX_Merge(src proto.Message)

func (*DiscoverResult) XXX_Size added in v0.5.0

func (m *DiscoverResult) XXX_Size() int

func (*DiscoverResult) XXX_Unmarshal added in v0.5.0

func (m *DiscoverResult) XXX_Unmarshal(b []byte) error

type Empty

type Empty struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Empty message

func (*Empty) Descriptor

func (*Empty) Descriptor() ([]byte, []int)

func (*Empty) Marshal

func (m *Empty) Marshal() (dAtA []byte, err error)

func (*Empty) MarshalTo

func (m *Empty) MarshalTo(dAtA []byte) (int, error)

func (*Empty) MarshalToSizedBuffer

func (m *Empty) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) Reset

func (m *Empty) Reset()

func (*Empty) Size

func (m *Empty) Size() (n int)

func (*Empty) String

func (m *Empty) String() string

func (*Empty) Unmarshal

func (m *Empty) Unmarshal(dAtA []byte) error

func (*Empty) XXX_DiscardUnknown

func (m *Empty) XXX_DiscardUnknown()

func (*Empty) XXX_Marshal

func (m *Empty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Empty) XXX_Merge

func (m *Empty) XXX_Merge(src proto.Message)

func (*Empty) XXX_Size

func (m *Empty) XXX_Size() int

func (*Empty) XXX_Unmarshal

func (m *Empty) XXX_Unmarshal(b []byte) error

type GetLogsRequest

type GetLogsRequest struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*GetLogsRequest) Descriptor

func (*GetLogsRequest) Descriptor() ([]byte, []int)

func (*GetLogsRequest) Marshal

func (m *GetLogsRequest) Marshal() (dAtA []byte, err error)

func (*GetLogsRequest) MarshalTo

func (m *GetLogsRequest) MarshalTo(dAtA []byte) (int, error)

func (*GetLogsRequest) MarshalToSizedBuffer

func (m *GetLogsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*GetLogsRequest) ProtoMessage

func (*GetLogsRequest) ProtoMessage()

func (*GetLogsRequest) Reset

func (m *GetLogsRequest) Reset()

func (*GetLogsRequest) Size

func (m *GetLogsRequest) Size() (n int)

func (*GetLogsRequest) String

func (m *GetLogsRequest) String() string

func (*GetLogsRequest) Unmarshal

func (m *GetLogsRequest) Unmarshal(dAtA []byte) error

func (*GetLogsRequest) XXX_DiscardUnknown

func (m *GetLogsRequest) XXX_DiscardUnknown()

func (*GetLogsRequest) XXX_Marshal

func (m *GetLogsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetLogsRequest) XXX_Merge

func (m *GetLogsRequest) XXX_Merge(src proto.Message)

func (*GetLogsRequest) XXX_Size

func (m *GetLogsRequest) XXX_Size() int

func (*GetLogsRequest) XXX_Unmarshal

func (m *GetLogsRequest) XXX_Unmarshal(b []byte) error

type Loc

type Loc struct {
	// Addres of the loc
	Address ObjectAddress `protobuf:"bytes,1,opt,name=address,proto3,customtype=ObjectAddress" json:"address"`
	// Requested state of the loc
	Request *LocState `protobuf:"bytes,2,opt,name=request,proto3" json:"request,omitempty"`
	// Actual state of the loc
	Actual               *LocState `protobuf:"bytes,3,opt,name=actual,proto3" json:"actual,omitempty"`
	XXX_NoUnkeyedLiteral struct{}  `json:"-"`
	XXX_unrecognized     []byte    `json:"-"`
	XXX_sizecache        int32     `json:"-"`
}

Loc message is used to request/report the speed, direction & functions of a loc.

func (*Loc) Clone

func (s *Loc) Clone() *Loc

Clone the entire object

func (*Loc) Descriptor

func (*Loc) Descriptor() ([]byte, []int)

func (*Loc) Equal

func (s *Loc) Equal(o *Loc) bool

Equal returns true when both objects have the same values.

func (*Loc) GetActual

func (m *Loc) GetActual() *LocState

func (*Loc) GetAddress

func (s *Loc) GetAddress() ObjectAddress

GetAddress returns the address of the object in a safe manor

func (*Loc) GetRequest

func (m *Loc) GetRequest() *LocState

func (*Loc) Marshal

func (m *Loc) Marshal() (dAtA []byte, err error)

func (*Loc) MarshalTo

func (m *Loc) MarshalTo(dAtA []byte) (int, error)

func (*Loc) MarshalToSizedBuffer

func (m *Loc) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Loc) ProtoMessage

func (*Loc) ProtoMessage()

func (*Loc) Reset

func (m *Loc) Reset()

func (*Loc) Size

func (m *Loc) Size() (n int)

func (*Loc) String

func (m *Loc) String() string

func (*Loc) Unmarshal

func (m *Loc) Unmarshal(dAtA []byte) error

func (*Loc) XXX_DiscardUnknown

func (m *Loc) XXX_DiscardUnknown()

func (*Loc) XXX_Marshal

func (m *Loc) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Loc) XXX_Merge

func (m *Loc) XXX_Merge(src proto.Message)

func (*Loc) XXX_Size

func (m *Loc) XXX_Size() int

func (*Loc) XXX_Unmarshal

func (m *Loc) XXX_Unmarshal(b []byte) error

type LocDirection

type LocDirection int32

Direction of locs

const (
	LocDirection_FORWARD LocDirection = 0
	LocDirection_REVERSE LocDirection = 1
)

func (LocDirection) EnumDescriptor

func (LocDirection) EnumDescriptor() ([]byte, []int)

func (LocDirection) String

func (x LocDirection) String() string

type LocRequestsOptions

type LocRequestsOptions struct {
	// If set, the network master must wait for an actual Loc message
	// to confirm the state transition.
	// If not set, the network master assumes the state is effective directly
	// after sending the message.
	ManualConfirm        bool     `protobuf:"varint,1,opt,name=manual_confirm,json=manualConfirm,proto3" json:"manual_confirm,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Request arguments for GetLocRequests

func (*LocRequestsOptions) Descriptor

func (*LocRequestsOptions) Descriptor() ([]byte, []int)

func (*LocRequestsOptions) GetManualConfirm

func (m *LocRequestsOptions) GetManualConfirm() bool

func (*LocRequestsOptions) Marshal

func (m *LocRequestsOptions) Marshal() (dAtA []byte, err error)

func (*LocRequestsOptions) MarshalTo

func (m *LocRequestsOptions) MarshalTo(dAtA []byte) (int, error)

func (*LocRequestsOptions) MarshalToSizedBuffer

func (m *LocRequestsOptions) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*LocRequestsOptions) ProtoMessage

func (*LocRequestsOptions) ProtoMessage()

func (*LocRequestsOptions) Reset

func (m *LocRequestsOptions) Reset()

func (*LocRequestsOptions) Size

func (m *LocRequestsOptions) Size() (n int)

func (*LocRequestsOptions) String

func (m *LocRequestsOptions) String() string

func (*LocRequestsOptions) Unmarshal

func (m *LocRequestsOptions) Unmarshal(dAtA []byte) error

func (*LocRequestsOptions) XXX_DiscardUnknown

func (m *LocRequestsOptions) XXX_DiscardUnknown()

func (*LocRequestsOptions) XXX_Marshal

func (m *LocRequestsOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LocRequestsOptions) XXX_Merge

func (m *LocRequestsOptions) XXX_Merge(src proto.Message)

func (*LocRequestsOptions) XXX_Size

func (m *LocRequestsOptions) XXX_Size() int

func (*LocRequestsOptions) XXX_Unmarshal

func (m *LocRequestsOptions) XXX_Unmarshal(b []byte) error

type LocState

type LocState struct {
	// Speed in steps
	Speed int32 `protobuf:"varint,1,opt,name=speed,proto3" json:"speed,omitempty"`
	// Maximum speed steps of this loc
	SpeedSteps int32 `protobuf:"varint,2,opt,name=speed_steps,json=speedSteps,proto3" json:"speed_steps,omitempty"`
	// Direction "forward|reverse"
	Direction LocDirection `protobuf:"varint,3,opt,name=direction,proto3,enum=binkynet.v1.LocDirection" json:"direction,omitempty"`
	// State of functions
	Functions            map[int32]bool `` /* 161-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}       `json:"-"`
	XXX_unrecognized     []byte         `json:"-"`
	XXX_sizecache        int32          `json:"-"`
}

LocState message is used to request/report the speed, direction & functions of a loc.

func (*LocState) Clone

func (s *LocState) Clone() *LocState

Clone the entire object

func (*LocState) Descriptor

func (*LocState) Descriptor() ([]byte, []int)

func (*LocState) Equal

func (s *LocState) Equal(o *LocState) bool

Equal returns true when both objects have the same values.

func (*LocState) GetDirection

func (m *LocState) GetDirection() LocDirection

func (*LocState) GetFunctions

func (m *LocState) GetFunctions() map[int32]bool

func (*LocState) GetSpeed

func (m *LocState) GetSpeed() int32

func (*LocState) GetSpeedSteps

func (m *LocState) GetSpeedSteps() int32

func (*LocState) Marshal

func (m *LocState) Marshal() (dAtA []byte, err error)

func (*LocState) MarshalTo

func (m *LocState) MarshalTo(dAtA []byte) (int, error)

func (*LocState) MarshalToSizedBuffer

func (m *LocState) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*LocState) ProtoMessage

func (*LocState) ProtoMessage()

func (*LocState) Reset

func (m *LocState) Reset()

func (*LocState) Size

func (m *LocState) Size() (n int)

func (*LocState) String

func (m *LocState) String() string

func (*LocState) Unmarshal

func (m *LocState) Unmarshal(dAtA []byte) error

func (*LocState) XXX_DiscardUnknown

func (m *LocState) XXX_DiscardUnknown()

func (*LocState) XXX_Marshal

func (m *LocState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LocState) XXX_Merge

func (m *LocState) XXX_Merge(src proto.Message)

func (*LocState) XXX_Size

func (m *LocState) XXX_Size() int

func (*LocState) XXX_Unmarshal

func (m *LocState) XXX_Unmarshal(b []byte) error

type LocalWorker added in v1.0.0

type LocalWorker struct {
	// Unique identifier of the local worker
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Requested configuration of the local worker
	Request *LocalWorkerConfig `protobuf:"bytes,2,opt,name=request,proto3" json:"request,omitempty"`
	// Actual state of the local worker
	Actual               *LocalWorkerInfo `protobuf:"bytes,3,opt,name=actual,proto3" json:"actual,omitempty"`
	XXX_NoUnkeyedLiteral struct{}         `json:"-"`
	XXX_unrecognized     []byte           `json:"-"`
	XXX_sizecache        int32            `json:"-"`
}

Requested & actual state of a local worker

func (*LocalWorker) Clone added in v1.0.0

func (s *LocalWorker) Clone() *LocalWorker

Clone the entire object

func (*LocalWorker) Descriptor added in v1.0.0

func (*LocalWorker) Descriptor() ([]byte, []int)

func (*LocalWorker) GetActual added in v1.0.0

func (m *LocalWorker) GetActual() *LocalWorkerInfo

func (*LocalWorker) GetId added in v1.0.0

func (m *LocalWorker) GetId() string

func (*LocalWorker) GetRequest added in v1.0.0

func (m *LocalWorker) GetRequest() *LocalWorkerConfig

func (*LocalWorker) Marshal added in v1.0.0

func (m *LocalWorker) Marshal() (dAtA []byte, err error)

func (*LocalWorker) MarshalTo added in v1.0.0

func (m *LocalWorker) MarshalTo(dAtA []byte) (int, error)

func (*LocalWorker) MarshalToSizedBuffer added in v1.0.0

func (m *LocalWorker) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*LocalWorker) ProtoMessage added in v1.0.0

func (*LocalWorker) ProtoMessage()

func (*LocalWorker) Reset added in v1.0.0

func (m *LocalWorker) Reset()

func (*LocalWorker) Size added in v1.0.0

func (m *LocalWorker) Size() (n int)

func (*LocalWorker) String added in v1.0.0

func (m *LocalWorker) String() string

func (*LocalWorker) Unmarshal added in v1.0.0

func (m *LocalWorker) Unmarshal(dAtA []byte) error

func (*LocalWorker) XXX_DiscardUnknown added in v1.0.0

func (m *LocalWorker) XXX_DiscardUnknown()

func (*LocalWorker) XXX_Marshal added in v1.0.0

func (m *LocalWorker) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LocalWorker) XXX_Merge added in v1.0.0

func (m *LocalWorker) XXX_Merge(src proto.Message)

func (*LocalWorker) XXX_Size added in v1.0.0

func (m *LocalWorker) XXX_Size() int

func (*LocalWorker) XXX_Unmarshal added in v1.0.0

func (m *LocalWorker) XXX_Unmarshal(b []byte) error

type LocalWorkerConfig

type LocalWorkerConfig struct {
	// Human readable alias for this local worker.
	Alias string `protobuf:"bytes,1,opt,name=alias,proto3" json:"alias,omitempty"`
	// List of devices that must be configured on this local worker.
	Devices []*Device `protobuf:"bytes,2,rep,name=devices,proto3" json:"devices,omitempty"`
	// List of real world objects controlled by the local worker
	Objects []*Object `protobuf:"bytes,3,rep,name=objects,proto3" json:"objects,omitempty"`
	// Timestamp of network manager in seconds since 1970.
	Unixtime int64 `protobuf:"varint,4,opt,name=unixtime,proto3" json:"unixtime,omitempty"`
	// Hash of the configuration (excluding unixtime)
	Hash                 string   `protobuf:"bytes,5,opt,name=hash,proto3" json:"hash,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Configuration for a local worker

func (*LocalWorkerConfig) Clone added in v1.0.0

Clone the entire object

func (*LocalWorkerConfig) Descriptor

func (*LocalWorkerConfig) Descriptor() ([]byte, []int)

func (LocalWorkerConfig) DeviceByID

func (c LocalWorkerConfig) DeviceByID(id DeviceID) (*Device, bool)

DeviceByID returns the device with given ID. Return false if not found.

func (*LocalWorkerConfig) Equal added in v0.11.1

Equal returns true when both objects have the same values.

func (*LocalWorkerConfig) GetAlias

func (m *LocalWorkerConfig) GetAlias() string

func (*LocalWorkerConfig) GetDevices

func (m *LocalWorkerConfig) GetDevices() []*Device

func (*LocalWorkerConfig) GetHash added in v1.0.0

func (m *LocalWorkerConfig) GetHash() string

func (*LocalWorkerConfig) GetObjects

func (m *LocalWorkerConfig) GetObjects() []*Object

func (*LocalWorkerConfig) GetUnixtime added in v0.13.0

func (m *LocalWorkerConfig) GetUnixtime() int64

func (*LocalWorkerConfig) HashTo added in v1.0.0

func (s *LocalWorkerConfig) HashTo(h hash.Hash)

HashTo appends the config into to the given hash.

func (*LocalWorkerConfig) Marshal

func (m *LocalWorkerConfig) Marshal() (dAtA []byte, err error)

func (*LocalWorkerConfig) MarshalTo

func (m *LocalWorkerConfig) MarshalTo(dAtA []byte) (int, error)

func (*LocalWorkerConfig) MarshalToSizedBuffer

func (m *LocalWorkerConfig) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (LocalWorkerConfig) ObjectByID

func (c LocalWorkerConfig) ObjectByID(id ObjectID) (*Object, bool)

ObjectByID returns the object with given ID. Return false if not found.

func (*LocalWorkerConfig) ProtoMessage

func (*LocalWorkerConfig) ProtoMessage()

func (*LocalWorkerConfig) Reset

func (m *LocalWorkerConfig) Reset()

func (*LocalWorkerConfig) Sha1 added in v1.0.0

func (s *LocalWorkerConfig) Sha1() string

Sha1 returns a sha1 hash of the config.

func (*LocalWorkerConfig) Size

func (m *LocalWorkerConfig) Size() (n int)

func (*LocalWorkerConfig) String

func (m *LocalWorkerConfig) String() string

func (*LocalWorkerConfig) Unmarshal

func (m *LocalWorkerConfig) Unmarshal(dAtA []byte) error

func (LocalWorkerConfig) Validate

func (c LocalWorkerConfig) Validate() error

Validate the given configuration, returning nil on ok, or an error upon validation issues.

func (*LocalWorkerConfig) XXX_DiscardUnknown

func (m *LocalWorkerConfig) XXX_DiscardUnknown()

func (*LocalWorkerConfig) XXX_Marshal

func (m *LocalWorkerConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LocalWorkerConfig) XXX_Merge

func (m *LocalWorkerConfig) XXX_Merge(src proto.Message)

func (*LocalWorkerConfig) XXX_Size

func (m *LocalWorkerConfig) XXX_Size() int

func (*LocalWorkerConfig) XXX_Unmarshal

func (m *LocalWorkerConfig) XXX_Unmarshal(b []byte) error

type LocalWorkerInfo

type LocalWorkerInfo struct {
	// Unique identifier of the local worker
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Human readable description of the local worker
	Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	// Version of the local worker in semantic versioning format.
	// E.g. 1.0.4
	Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"`
	// Uptime of the local worker in seconds.
	Uptime int64 `protobuf:"varint,4,opt,name=uptime,proto3" json:"uptime,omitempty"`
	// Hash of the current configuration
	ConfigHash string `protobuf:"bytes,5,opt,name=config_hash,json=configHash,proto3" json:"config_hash,omitempty"`
	// IDs of all configured devices
	ConfiguredDeviceIds []string `protobuf:"bytes,6,rep,name=configured_device_ids,json=configuredDeviceIds,proto3" json:"configured_device_ids,omitempty"`
	// IDs of all configured objects
	ConfiguredObjectIds []string `protobuf:"bytes,7,rep,name=configured_object_ids,json=configuredObjectIds,proto3" json:"configured_object_ids,omitempty"`
	// IDs of all unconfigured devices
	UnconfiguredDeviceIds []string `` /* 126-byte string literal not displayed */
	// IDs of all unconfigured objects
	UnconfiguredObjectIds []string `` /* 126-byte string literal not displayed */
	// HTTP(s) port to serve metrics on
	MetricsPort int32 `protobuf:"varint,10,opt,name=metrics_port,json=metricsPort,proto3" json:"metrics_port,omitempty"`
	// If set to true, metrics are served over HTTPS, otherwise HTTP
	MetricsSecure bool `protobuf:"varint,11,opt,name=metrics_secure,json=metricsSecure,proto3" json:"metrics_secure,omitempty"`
	// Port this local worker is serving the LocalWorkerService on.
	LocalWorkerServicePort int32 `` /* 133-byte string literal not displayed */
	// If set, LocalWorkerService is served over TLS.
	LocalWorkerServiceSecure bool `` /* 139-byte string literal not displayed */
	// If set, local worker implements LocalWorkerService.Reset
	SupportsReset bool `protobuf:"varint,101,opt,name=supports_reset,json=supportsReset,proto3" json:"supports_reset,omitempty"`
	// If set, local worker implements LocalWorkerService.SetLocRequest
	SupportsSetLocRequest bool `` /* 131-byte string literal not displayed */
	// If set, local worker implements LocalWorkerService.SetPowerRequest
	SupportsSetPowerRequest bool `` /* 137-byte string literal not displayed */
	// If set, local worker implements LocalWorkerService.SetOutputRequest
	SupportsSetOutputRequest bool `` /* 140-byte string literal not displayed */
	// If set, local worker implements LocalWorkerService.SetSwitchRequest
	SupportsSetSwitchRequest bool `` /* 140-byte string literal not displayed */
	// If set, local worker implements LocalWorkerService.SetDeviceDiscoveryRequest
	SupportsSetDeviceDiscoveryRequest bool     `` /* 169-byte string literal not displayed */
	XXX_NoUnkeyedLiteral              struct{} `json:"-"`
	XXX_unrecognized                  []byte   `json:"-"`
	XXX_sizecache                     int32    `json:"-"`
}

Information about the local worker

func (*LocalWorkerInfo) Clone added in v1.0.0

func (s *LocalWorkerInfo) Clone() *LocalWorkerInfo

Clone the entire object

func (*LocalWorkerInfo) Descriptor

func (*LocalWorkerInfo) Descriptor() ([]byte, []int)

func (*LocalWorkerInfo) GetConfigHash added in v1.0.0

func (m *LocalWorkerInfo) GetConfigHash() string

func (*LocalWorkerInfo) GetConfiguredDeviceIds added in v1.3.2

func (m *LocalWorkerInfo) GetConfiguredDeviceIds() []string

func (*LocalWorkerInfo) GetConfiguredObjectIds added in v1.3.2

func (m *LocalWorkerInfo) GetConfiguredObjectIds() []string

func (*LocalWorkerInfo) GetDescription

func (m *LocalWorkerInfo) GetDescription() string

func (*LocalWorkerInfo) GetId

func (m *LocalWorkerInfo) GetId() string

func (*LocalWorkerInfo) GetLocalWorkerServicePort added in v1.10.0

func (m *LocalWorkerInfo) GetLocalWorkerServicePort() int32

func (*LocalWorkerInfo) GetLocalWorkerServiceSecure added in v1.10.0

func (m *LocalWorkerInfo) GetLocalWorkerServiceSecure() bool

func (*LocalWorkerInfo) GetMetricsPort added in v1.4.0

func (m *LocalWorkerInfo) GetMetricsPort() int32

func (*LocalWorkerInfo) GetMetricsSecure added in v1.4.0

func (m *LocalWorkerInfo) GetMetricsSecure() bool

func (*LocalWorkerInfo) GetSupportsReset added in v1.11.0

func (m *LocalWorkerInfo) GetSupportsReset() bool

func (*LocalWorkerInfo) GetSupportsSetDeviceDiscoveryRequest added in v1.12.0

func (m *LocalWorkerInfo) GetSupportsSetDeviceDiscoveryRequest() bool

func (*LocalWorkerInfo) GetSupportsSetLocRequest added in v1.11.0

func (m *LocalWorkerInfo) GetSupportsSetLocRequest() bool

func (*LocalWorkerInfo) GetSupportsSetOutputRequest added in v1.11.0

func (m *LocalWorkerInfo) GetSupportsSetOutputRequest() bool

func (*LocalWorkerInfo) GetSupportsSetPowerRequest added in v1.11.0

func (m *LocalWorkerInfo) GetSupportsSetPowerRequest() bool

func (*LocalWorkerInfo) GetSupportsSetSwitchRequest added in v1.11.0

func (m *LocalWorkerInfo) GetSupportsSetSwitchRequest() bool

func (*LocalWorkerInfo) GetUnconfiguredDeviceIds added in v1.3.3

func (m *LocalWorkerInfo) GetUnconfiguredDeviceIds() []string

func (*LocalWorkerInfo) GetUnconfiguredObjectIds added in v1.3.3

func (m *LocalWorkerInfo) GetUnconfiguredObjectIds() []string

func (*LocalWorkerInfo) GetUptime

func (m *LocalWorkerInfo) GetUptime() int64

func (*LocalWorkerInfo) GetVersion

func (m *LocalWorkerInfo) GetVersion() string

func (*LocalWorkerInfo) Marshal

func (m *LocalWorkerInfo) Marshal() (dAtA []byte, err error)

func (*LocalWorkerInfo) MarshalTo

func (m *LocalWorkerInfo) MarshalTo(dAtA []byte) (int, error)

func (*LocalWorkerInfo) MarshalToSizedBuffer

func (m *LocalWorkerInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*LocalWorkerInfo) ProtoMessage

func (*LocalWorkerInfo) ProtoMessage()

func (*LocalWorkerInfo) Reset

func (m *LocalWorkerInfo) Reset()

func (*LocalWorkerInfo) Size

func (m *LocalWorkerInfo) Size() (n int)

func (*LocalWorkerInfo) String

func (m *LocalWorkerInfo) String() string

func (*LocalWorkerInfo) Unmarshal

func (m *LocalWorkerInfo) Unmarshal(dAtA []byte) error

func (*LocalWorkerInfo) XXX_DiscardUnknown

func (m *LocalWorkerInfo) XXX_DiscardUnknown()

func (*LocalWorkerInfo) XXX_Marshal

func (m *LocalWorkerInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LocalWorkerInfo) XXX_Merge

func (m *LocalWorkerInfo) XXX_Merge(src proto.Message)

func (*LocalWorkerInfo) XXX_Size

func (m *LocalWorkerInfo) XXX_Size() int

func (*LocalWorkerInfo) XXX_Unmarshal

func (m *LocalWorkerInfo) XXX_Unmarshal(b []byte) error

type LocalWorkerServiceClient added in v1.10.0

type LocalWorkerServiceClient interface {
	// Reset the local worker
	Reset(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error)
	// Set a requested loc state
	SetLocRequest(ctx context.Context, in *Loc, opts ...grpc.CallOption) (*Empty, error)
	// Set the requested power state
	SetPowerRequest(ctx context.Context, in *PowerState, opts ...grpc.CallOption) (*Empty, error)
	// Set a requested output state
	SetOutputRequest(ctx context.Context, in *Output, opts ...grpc.CallOption) (*Empty, error)
	// Set a requested switch state
	SetSwitchRequest(ctx context.Context, in *Switch, opts ...grpc.CallOption) (*Empty, error)
	// Set a requested device discovery state
	SetDeviceDiscoveryRequest(ctx context.Context, in *DeviceDiscovery, opts ...grpc.CallOption) (*Empty, error)
}

LocalWorkerServiceClient is the client API for LocalWorkerService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewLocalWorkerServiceClient added in v1.10.0

func NewLocalWorkerServiceClient(cc *grpc.ClientConn) LocalWorkerServiceClient

type LocalWorkerServiceServer added in v1.10.0

type LocalWorkerServiceServer interface {
	// Reset the local worker
	Reset(context.Context, *Empty) (*Empty, error)
	// Set a requested loc state
	SetLocRequest(context.Context, *Loc) (*Empty, error)
	// Set the requested power state
	SetPowerRequest(context.Context, *PowerState) (*Empty, error)
	// Set a requested output state
	SetOutputRequest(context.Context, *Output) (*Empty, error)
	// Set a requested switch state
	SetSwitchRequest(context.Context, *Switch) (*Empty, error)
	// Set a requested device discovery state
	SetDeviceDiscoveryRequest(context.Context, *DeviceDiscovery) (*Empty, error)
}

LocalWorkerServiceServer is the server API for LocalWorkerService service.

type LogEntry

type LogEntry struct {
	// Message of the log entry
	Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	// Log level
	Level                LogLevel `protobuf:"varint,2,opt,name=level,proto3,enum=binkynet.v1.LogLevel" json:"level,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*LogEntry) Descriptor

func (*LogEntry) Descriptor() ([]byte, []int)

func (*LogEntry) GetLevel added in v0.3.0

func (m *LogEntry) GetLevel() LogLevel

func (*LogEntry) GetMessage

func (m *LogEntry) GetMessage() string

func (*LogEntry) Marshal

func (m *LogEntry) Marshal() (dAtA []byte, err error)

func (*LogEntry) MarshalTo

func (m *LogEntry) MarshalTo(dAtA []byte) (int, error)

func (*LogEntry) MarshalToSizedBuffer

func (m *LogEntry) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*LogEntry) ProtoMessage

func (*LogEntry) ProtoMessage()

func (*LogEntry) Reset

func (m *LogEntry) Reset()

func (*LogEntry) Size

func (m *LogEntry) Size() (n int)

func (*LogEntry) String

func (m *LogEntry) String() string

func (*LogEntry) Unmarshal

func (m *LogEntry) Unmarshal(dAtA []byte) error

func (*LogEntry) XXX_DiscardUnknown

func (m *LogEntry) XXX_DiscardUnknown()

func (*LogEntry) XXX_Marshal

func (m *LogEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LogEntry) XXX_Merge

func (m *LogEntry) XXX_Merge(src proto.Message)

func (*LogEntry) XXX_Size

func (m *LogEntry) XXX_Size() int

func (*LogEntry) XXX_Unmarshal

func (m *LogEntry) XXX_Unmarshal(b []byte) error

type LogLevel

type LogLevel int32

Log levels

const (
	LogLevel_TRACE   LogLevel = 0
	LogLevel_DEBUG   LogLevel = 1
	LogLevel_INFO    LogLevel = 2
	LogLevel_WARNING LogLevel = 3
	LogLevel_ERROR   LogLevel = 4
	LogLevel_FATAL   LogLevel = 5
)

func (LogLevel) EnumDescriptor

func (LogLevel) EnumDescriptor() ([]byte, []int)

func (LogLevel) String

func (x LogLevel) String() string

type LogProviderServiceClient

type LogProviderServiceClient interface {
	// Record a log message.
	GetLogs(ctx context.Context, in *GetLogsRequest, opts ...grpc.CallOption) (LogProviderService_GetLogsClient, error)
}

LogProviderServiceClient is the client API for LogProviderService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewLogProviderServiceClient

func NewLogProviderServiceClient(cc *grpc.ClientConn) LogProviderServiceClient

type LogProviderServiceServer

type LogProviderServiceServer interface {
	// Record a log message.
	GetLogs(*GetLogsRequest, LogProviderService_GetLogsServer) error
}

LogProviderServiceServer is the server API for LogProviderService service.

type LogProviderService_GetLogsClient

type LogProviderService_GetLogsClient interface {
	Recv() (*LogEntry, error)
	grpc.ClientStream
}

type LogProviderService_GetLogsServer

type LogProviderService_GetLogsServer interface {
	Send(*LogEntry) error
	grpc.ServerStream
}

type NetworkControlServiceClient

type NetworkControlServiceClient interface {
	// Set the requested local worker state
	SetLocalWorkerRequest(ctx context.Context, in *LocalWorker, opts ...grpc.CallOption) (*Empty, error)
	// Set the actual local worker state
	SetLocalWorkerActual(ctx context.Context, in *LocalWorker, opts ...grpc.CallOption) (*Empty, error)
	// Watch local worker changes
	WatchLocalWorkers(ctx context.Context, in *WatchOptions, opts ...grpc.CallOption) (NetworkControlService_WatchLocalWorkersClient, error)
	// Set an actual device discovery state
	SetDeviceDiscoveryActual(ctx context.Context, in *DeviceDiscovery, opts ...grpc.CallOption) (*Empty, error)
	// Set the actual power state
	SetPowerActual(ctx context.Context, in *PowerState, opts ...grpc.CallOption) (*Empty, error)
	// Set an actual loc state
	SetLocActual(ctx context.Context, in *Loc, opts ...grpc.CallOption) (*Empty, error)
	// Set an actual sensor state
	SetSensorActual(ctx context.Context, in *Sensor, opts ...grpc.CallOption) (*Empty, error)
	// Set an actual output state
	SetOutputActual(ctx context.Context, in *Output, opts ...grpc.CallOption) (*Empty, error)
	// Set an actual switch state
	SetSwitchActual(ctx context.Context, in *Switch, opts ...grpc.CallOption) (*Empty, error)
	// Set an actual clock state
	SetClockActual(ctx context.Context, in *Clock, opts ...grpc.CallOption) (*Empty, error)
	// Watch clock changes
	WatchClock(ctx context.Context, in *WatchOptions, opts ...grpc.CallOption) (NetworkControlService_WatchClockClient, error)
}

NetworkControlServiceClient is the client API for NetworkControlService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewNetworkControlServiceClient

func NewNetworkControlServiceClient(cc *grpc.ClientConn) NetworkControlServiceClient

type NetworkControlServiceServer

type NetworkControlServiceServer interface {
	// Set the requested local worker state
	SetLocalWorkerRequest(context.Context, *LocalWorker) (*Empty, error)
	// Set the actual local worker state
	SetLocalWorkerActual(context.Context, *LocalWorker) (*Empty, error)
	// Watch local worker changes
	WatchLocalWorkers(*WatchOptions, NetworkControlService_WatchLocalWorkersServer) error
	// Set an actual device discovery state
	SetDeviceDiscoveryActual(context.Context, *DeviceDiscovery) (*Empty, error)
	// Set the actual power state
	SetPowerActual(context.Context, *PowerState) (*Empty, error)
	// Set an actual loc state
	SetLocActual(context.Context, *Loc) (*Empty, error)
	// Set an actual sensor state
	SetSensorActual(context.Context, *Sensor) (*Empty, error)
	// Set an actual output state
	SetOutputActual(context.Context, *Output) (*Empty, error)
	// Set an actual switch state
	SetSwitchActual(context.Context, *Switch) (*Empty, error)
	// Set an actual clock state
	SetClockActual(context.Context, *Clock) (*Empty, error)
	// Watch clock changes
	WatchClock(*WatchOptions, NetworkControlService_WatchClockServer) error
}

NetworkControlServiceServer is the server API for NetworkControlService service.

type NetworkControlService_WatchClockClient added in v1.0.0

type NetworkControlService_WatchClockClient interface {
	Recv() (*Clock, error)
	grpc.ClientStream
}

type NetworkControlService_WatchClockServer added in v1.0.0

type NetworkControlService_WatchClockServer interface {
	Send(*Clock) error
	grpc.ServerStream
}

type NetworkControlService_WatchLocalWorkersClient added in v1.0.0

type NetworkControlService_WatchLocalWorkersClient interface {
	Recv() (*LocalWorker, error)
	grpc.ClientStream
}

type NetworkControlService_WatchLocalWorkersServer added in v1.0.0

type NetworkControlService_WatchLocalWorkersServer interface {
	Send(*LocalWorker) error
	grpc.ServerStream
}

type Object

type Object struct {
	// ID of the object
	Id ObjectID `protobuf:"bytes,1,opt,name=id,proto3,customtype=ObjectID" json:"id"`
	// Type of the object.
	// See objectypes.go
	Type ObjectType `protobuf:"bytes,2,opt,name=type,proto3,customtype=ObjectType" json:"type"`
	// Connections to devices used by this object
	// The keys used in this map are specific to the type of object.
	Connections []*Connection `protobuf:"bytes,3,rep,name=connections,proto3" json:"connections,omitempty"`
	// Optional configuration for this object.
	// Keys & values are specific to the object type.
	Configuration        map[ObjectConfigKey]string `` /* 191-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}                   `json:"-"`
	XXX_unrecognized     []byte                     `json:"-"`
	XXX_sizecache        int32                      `json:"-"`
}

Object represents a logical object on the railway such as a switch.

func (*Object) Clone added in v1.0.0

func (s *Object) Clone() *Object

Clone the entire object

func (Object) ConnectionByName

func (o Object) ConnectionByName(name ConnectionName) (*Connection, bool)

ConnectionByName returns the connection of the object with given name

func (*Object) Descriptor

func (*Object) Descriptor() ([]byte, []int)

func (*Object) Equal added in v0.11.1

func (s *Object) Equal(o *Object) bool

Equal returns true when both objects have the same values.

func (Object) GetBoolConfig added in v1.6.1

func (o Object) GetBoolConfig(key ObjectConfigKey) bool

GetBoolConfig returns the bool-typed configuration value for the given key. If not found or not an int, the default value for the key is returned.

func (*Object) GetConfiguration added in v1.6.0

func (m *Object) GetConfiguration() map[ObjectConfigKey]string

func (*Object) GetConnections

func (m *Object) GetConnections() []*Connection

func (*Object) GetId

func (s *Object) GetId() ObjectID

GetId returns the id of the object in a safe manor

func (Object) GetIntConfig added in v1.6.1

func (o Object) GetIntConfig(key ObjectConfigKey) int

GetIntConfig returns the int-typed configuration value for the given key. If not found or not an int, the default value for the key is returned.

func (Object) GetStringConfig added in v1.6.1

func (o Object) GetStringConfig(key ObjectConfigKey) string

GetStringConfig returns the configuration value for the given key. If not found, the default value for the key is returned.

func (*Object) GetType

func (s *Object) GetType() ObjectType

GetType returns the type of the object in a safe manor

func (*Object) HashTo added in v1.0.0

func (s *Object) HashTo(h hash.Hash)

HashTo appends the object into to the given hash.

func (*Object) Marshal

func (m *Object) Marshal() (dAtA []byte, err error)

func (*Object) MarshalTo

func (m *Object) MarshalTo(dAtA []byte) (int, error)

func (*Object) MarshalToSizedBuffer

func (m *Object) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Object) ProtoMessage

func (*Object) ProtoMessage()

func (*Object) Reset

func (m *Object) Reset()

func (*Object) Size

func (m *Object) Size() (n int)

func (*Object) String

func (m *Object) String() string

func (*Object) Unmarshal

func (m *Object) Unmarshal(dAtA []byte) error

func (Object) Validate

func (o Object) Validate() error

Validate the given configuration, returning nil on ok, or an error upon validation issues.

func (*Object) XXX_DiscardUnknown

func (m *Object) XXX_DiscardUnknown()

func (*Object) XXX_Marshal

func (m *Object) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Object) XXX_Merge

func (m *Object) XXX_Merge(src proto.Message)

func (*Object) XXX_Size

func (m *Object) XXX_Size() int

func (*Object) XXX_Unmarshal

func (m *Object) XXX_Unmarshal(b []byte) error

type ObjectAddress

type ObjectAddress string

ObjectAddress is a strongly typed address of an object. It contains <module> '/' <object-id>

func JoinModuleLocal

func JoinModuleLocal(module, local string) ObjectAddress

JoinModuleLocal joins a module ID with local ID into an address.

func (ObjectAddress) IsGlobal added in v0.10.1

func (addr ObjectAddress) IsGlobal() bool

IsGlobal returns true if the given address has a global module ID.

type ObjectConfigKey added in v1.6.0

type ObjectConfigKey string

ObjectConfigKey is a strongly typed well known key of a configuration entry of an object type.

const (
	// ObjectConfigKeyDebug turns on/off debugging information for a specific object.
	// Values are true|false|0|1.
	ObjectConfigKeyDebug ObjectConfigKey = "debug"
	// ObjectConfigKeyMagneticAlwaysEnabled configures the always-enabled setting for
	// a magnetic switch. If set to true, the magnets are always powered, even when
	// the network controller does not indicate the switch as being enabled.
	// Values are true|false|0|1.
	ObjectConfigKeyMagneticAlwaysEnabled ObjectConfigKey = "magnetic-always-enabled"
	// ObjectConfigKeyMagneticStraightInvert configures the inversion setting
	// magnetic wires on the magnet driving the straight direction.
	// Values are true|false|0|1.
	ObjectConfigKeyMagneticStraightInvert ObjectConfigKey = "magnetic-straight-invert"
	// ObjectConfigKeyMagneticOffInvert configures the inversion setting
	// magnetic wires on the magnet driving the off direction.
	// Values are true|false|0|1.
	ObjectConfigKeyMagneticOffInvert ObjectConfigKey = "magnetic-off-invert"
)

func AllObjectConfigKeys added in v1.6.0

func AllObjectConfigKeys() []ObjectConfigKey

func (ObjectConfigKey) DefaultValue added in v1.6.0

func (key ObjectConfigKey) DefaultValue() string

DefaultValue returns the default value for a given configuration key.

func (ObjectConfigKey) ValidateValue added in v1.6.0

func (key ObjectConfigKey) ValidateValue(value string) error

ValidateValue validates a given value for a given configuration key.

type ObjectConnectionInfo

type ObjectConnectionInfo struct {
	// Name of the connection from object to device
	Name ConnectionName
	// If this connection required?
	Required bool
	// How many device-pins are expected for this connection
	PinCount int
}

ObjectConnectionInfo descripts a connection of a type of objects to a device.

type ObjectID

type ObjectID string

ObjectID is a strongly typed identifier of an object.

type ObjectType

type ObjectType string

ObjectType identifies a type of real world objects.

const (
	// ObjectTypeBinarySensor is the object type of a single-bit on/off sensor
	ObjectTypeBinarySensor ObjectType = "binary-sensor"
	// ObjectTypeBinaryOutput is the object type of a single-bit on/off output
	ObjectTypeBinaryOutput ObjectType = "binary-output"
	// ObjectTypeMagneticSwitch is the object type of switch that a single magnetic coil per direction.
	// The coil has to stay activated.
	ObjectTypeMagneticSwitch ObjectType = "magnetic-switch"
	// ObjectTypeServoSwitch is the object type of a servo driven switch, with an option phase switching relay.
	ObjectTypeServoSwitch ObjectType = "servo-switch"
	// ObjectTypeRelaySwitch is the object type of a double relay driven switch, with an option phase switching relay.
	ObjectTypeRelaySwitch ObjectType = "relay-switch"
	// ObjectTypeTrackInverter is the object type of a four relay based track power inverter.
	ObjectTypeTrackInverter ObjectType = "track-inverter"
)

func AllObjectTypes added in v0.2.2

func AllObjectTypes() []ObjectType

AllObjectTypes returns all possible object types.

func (ObjectType) ExpectedConfigurations added in v0.6.2

func (ot ObjectType) ExpectedConfigurations() []ObjectConfigKey

ExpectedConfigurations returns the possible configuration keys that are supported for an object of given type. Returns: Supported configuration keys

func (ObjectType) ExpectedConnections added in v0.2.4

func (ot ObjectType) ExpectedConnections() ([]ConnectionName, []ConnectionName)

ExpectedConnections returns the connection names that are expected for an object of given type. Returns: Required connections, Optional connections

func (ObjectType) TypeInfo

func (t ObjectType) TypeInfo() ObjectTypeInfo

TypeInfo returns the ObjectType information for this type of object.

func (ObjectType) Validate

func (t ObjectType) Validate() error

Validate the given type, returning nil on ok, or an error upon validation issues.

type ObjectTypeInfo

type ObjectTypeInfo struct {
	// Type of the object
	Type ObjectType
	// Description of the object type
	Description string
	// Possible (required & optional) connections of objects of this type to devices.
	Connections []ObjectConnectionInfo
}

ObjectTypeInfo holds builtin information for a type of objects.

func (ObjectTypeInfo) ConnectionByName

func (i ObjectTypeInfo) ConnectionByName(name ConnectionName) (ObjectConnectionInfo, bool)

ConnectionByName returns the information for the connection with given name. Returns name, found.

type Output

type Output struct {
	// Addres of the output
	Address ObjectAddress `protobuf:"bytes,1,opt,name=address,proto3,customtype=ObjectAddress" json:"address"`
	// Requested state of the output
	Request *OutputState `protobuf:"bytes,2,opt,name=request,proto3" json:"request,omitempty"`
	// Actual state of the output
	Actual               *OutputState `protobuf:"bytes,3,opt,name=actual,proto3" json:"actual,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

Output is used to control a generic output device. E.g. a light.

func (*Output) Clone

func (s *Output) Clone() *Output

Clone the entire object

func (*Output) Descriptor

func (*Output) Descriptor() ([]byte, []int)

func (*Output) Equal

func (s *Output) Equal(o *Output) bool

Equal returns true when both objects have the same values.

func (*Output) GetActual

func (m *Output) GetActual() *OutputState

func (*Output) GetAddress

func (s *Output) GetAddress() ObjectAddress

GetAddress returns the address of the object in a safe manor

func (*Output) GetRequest

func (m *Output) GetRequest() *OutputState

func (*Output) Marshal

func (m *Output) Marshal() (dAtA []byte, err error)

func (*Output) MarshalTo

func (m *Output) MarshalTo(dAtA []byte) (int, error)

func (*Output) MarshalToSizedBuffer

func (m *Output) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Output) ProtoMessage

func (*Output) ProtoMessage()

func (*Output) Reset

func (m *Output) Reset()

func (*Output) Size

func (m *Output) Size() (n int)

func (*Output) String

func (m *Output) String() string

func (*Output) Unmarshal

func (m *Output) Unmarshal(dAtA []byte) error

func (*Output) XXX_DiscardUnknown

func (m *Output) XXX_DiscardUnknown()

func (*Output) XXX_Marshal

func (m *Output) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Output) XXX_Merge

func (m *Output) XXX_Merge(src proto.Message)

func (*Output) XXX_Size

func (m *Output) XXX_Size() int

func (*Output) XXX_Unmarshal

func (m *Output) XXX_Unmarshal(b []byte) error

type OutputRequestsOptions

type OutputRequestsOptions struct {
	// If set, the network master must wait for an actual Output message
	// to confirm the state transition.
	// If not set, the network master assumes the state is effective directly
	// after sending the message.
	ManualConfirm bool `protobuf:"varint,1,opt,name=manual_confirm,json=manualConfirm,proto3" json:"manual_confirm,omitempty"`
	// If set, pass only output requests that match this module ID.
	ModuleId             string   `protobuf:"bytes,2,opt,name=module_id,json=moduleId,proto3" json:"module_id,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Request arguments for GetOutputRequests

func (*OutputRequestsOptions) Descriptor

func (*OutputRequestsOptions) Descriptor() ([]byte, []int)

func (*OutputRequestsOptions) GetManualConfirm

func (m *OutputRequestsOptions) GetManualConfirm() bool

func (*OutputRequestsOptions) GetModuleId added in v0.9.6

func (m *OutputRequestsOptions) GetModuleId() string

func (*OutputRequestsOptions) Marshal

func (m *OutputRequestsOptions) Marshal() (dAtA []byte, err error)

func (*OutputRequestsOptions) MarshalTo

func (m *OutputRequestsOptions) MarshalTo(dAtA []byte) (int, error)

func (*OutputRequestsOptions) MarshalToSizedBuffer

func (m *OutputRequestsOptions) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*OutputRequestsOptions) ProtoMessage

func (*OutputRequestsOptions) ProtoMessage()

func (*OutputRequestsOptions) Reset

func (m *OutputRequestsOptions) Reset()

func (*OutputRequestsOptions) Size

func (m *OutputRequestsOptions) Size() (n int)

func (*OutputRequestsOptions) String

func (m *OutputRequestsOptions) String() string

func (*OutputRequestsOptions) Unmarshal

func (m *OutputRequestsOptions) Unmarshal(dAtA []byte) error

func (*OutputRequestsOptions) XXX_DiscardUnknown

func (m *OutputRequestsOptions) XXX_DiscardUnknown()

func (*OutputRequestsOptions) XXX_Marshal

func (m *OutputRequestsOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*OutputRequestsOptions) XXX_Merge

func (m *OutputRequestsOptions) XXX_Merge(src proto.Message)

func (*OutputRequestsOptions) XXX_Size

func (m *OutputRequestsOptions) XXX_Size() int

func (*OutputRequestsOptions) XXX_Unmarshal

func (m *OutputRequestsOptions) XXX_Unmarshal(b []byte) error

type OutputState

type OutputState struct {
	// Value of the output
	Value                int32    `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

OutputState is used to request/report the state of a generic output device. E.g. a light.

func (*OutputState) Clone

func (s *OutputState) Clone() *OutputState

Clone the entire object

func (*OutputState) Descriptor

func (*OutputState) Descriptor() ([]byte, []int)

func (*OutputState) Equal

func (s *OutputState) Equal(o *OutputState) bool

Equal returns true when both objects have the same values.

func (*OutputState) GetValue

func (m *OutputState) GetValue() int32

func (*OutputState) Marshal

func (m *OutputState) Marshal() (dAtA []byte, err error)

func (*OutputState) MarshalTo

func (m *OutputState) MarshalTo(dAtA []byte) (int, error)

func (*OutputState) MarshalToSizedBuffer

func (m *OutputState) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*OutputState) ProtoMessage

func (*OutputState) ProtoMessage()

func (*OutputState) Reset

func (m *OutputState) Reset()

func (*OutputState) Size

func (m *OutputState) Size() (n int)

func (*OutputState) String

func (m *OutputState) String() string

func (*OutputState) Unmarshal

func (m *OutputState) Unmarshal(dAtA []byte) error

func (*OutputState) XXX_DiscardUnknown

func (m *OutputState) XXX_DiscardUnknown()

func (*OutputState) XXX_Marshal

func (m *OutputState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*OutputState) XXX_Merge

func (m *OutputState) XXX_Merge(src proto.Message)

func (*OutputState) XXX_Size

func (m *OutputState) XXX_Size() int

func (*OutputState) XXX_Unmarshal

func (m *OutputState) XXX_Unmarshal(b []byte) error

type Power

type Power struct {
	// Requested power state
	Request *PowerState `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"`
	// Actual power state
	Actual               *PowerState `protobuf:"bytes,2,opt,name=actual,proto3" json:"actual,omitempty"`
	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
	XXX_unrecognized     []byte      `json:"-"`
	XXX_sizecache        int32       `json:"-"`
}

Power message contains the requested & actual state of the power on the track.

func (*Power) Clone

func (s *Power) Clone() *Power

Clone the entire object

func (*Power) Descriptor

func (*Power) Descriptor() ([]byte, []int)

func (*Power) Equal

func (s *Power) Equal(o *Power) bool

Equal returns true when both objects have the same values.

func (*Power) GetActual

func (m *Power) GetActual() *PowerState

func (*Power) GetRequest

func (m *Power) GetRequest() *PowerState

func (*Power) Marshal

func (m *Power) Marshal() (dAtA []byte, err error)

func (*Power) MarshalTo

func (m *Power) MarshalTo(dAtA []byte) (int, error)

func (*Power) MarshalToSizedBuffer

func (m *Power) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Power) ProtoMessage

func (*Power) ProtoMessage()

func (*Power) Reset

func (m *Power) Reset()

func (*Power) Size

func (m *Power) Size() (n int)

func (*Power) String

func (m *Power) String() string

func (*Power) Unmarshal

func (m *Power) Unmarshal(dAtA []byte) error

func (*Power) XXX_DiscardUnknown

func (m *Power) XXX_DiscardUnknown()

func (*Power) XXX_Marshal

func (m *Power) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Power) XXX_Merge

func (m *Power) XXX_Merge(src proto.Message)

func (*Power) XXX_Size

func (m *Power) XXX_Size() int

func (*Power) XXX_Unmarshal

func (m *Power) XXX_Unmarshal(b []byte) error

type PowerRequestsOptions

type PowerRequestsOptions struct {
	// If set, the network master must wait for an actual Power message
	// to confirm the state transition.
	// If not set, the network master assumes the power state is effective directly
	// after sending the message.
	ManualConfirm        bool     `protobuf:"varint,1,opt,name=manual_confirm,json=manualConfirm,proto3" json:"manual_confirm,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Request arguments for GetPowerRequests

func (*PowerRequestsOptions) Descriptor

func (*PowerRequestsOptions) Descriptor() ([]byte, []int)

func (*PowerRequestsOptions) GetManualConfirm

func (m *PowerRequestsOptions) GetManualConfirm() bool

func (*PowerRequestsOptions) Marshal

func (m *PowerRequestsOptions) Marshal() (dAtA []byte, err error)

func (*PowerRequestsOptions) MarshalTo

func (m *PowerRequestsOptions) MarshalTo(dAtA []byte) (int, error)

func (*PowerRequestsOptions) MarshalToSizedBuffer

func (m *PowerRequestsOptions) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*PowerRequestsOptions) ProtoMessage

func (*PowerRequestsOptions) ProtoMessage()

func (*PowerRequestsOptions) Reset

func (m *PowerRequestsOptions) Reset()

func (*PowerRequestsOptions) Size

func (m *PowerRequestsOptions) Size() (n int)

func (*PowerRequestsOptions) String

func (m *PowerRequestsOptions) String() string

func (*PowerRequestsOptions) Unmarshal

func (m *PowerRequestsOptions) Unmarshal(dAtA []byte) error

func (*PowerRequestsOptions) XXX_DiscardUnknown

func (m *PowerRequestsOptions) XXX_DiscardUnknown()

func (*PowerRequestsOptions) XXX_Marshal

func (m *PowerRequestsOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PowerRequestsOptions) XXX_Merge

func (m *PowerRequestsOptions) XXX_Merge(src proto.Message)

func (*PowerRequestsOptions) XXX_Size

func (m *PowerRequestsOptions) XXX_Size() int

func (*PowerRequestsOptions) XXX_Unmarshal

func (m *PowerRequestsOptions) XXX_Unmarshal(b []byte) error

type PowerState

type PowerState struct {
	// Power on/off
	Enabled              bool     `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

PowerState message contains the requested/actual state of the power on the track.

func (*PowerState) Clone

func (s *PowerState) Clone() *PowerState

Clone the entire object

func (*PowerState) Descriptor

func (*PowerState) Descriptor() ([]byte, []int)

func (*PowerState) Equal

func (s *PowerState) Equal(o *PowerState) bool

Equal returns true when both objects have the same values.

func (*PowerState) GetEnabled

func (m *PowerState) GetEnabled() bool

func (*PowerState) Marshal

func (m *PowerState) Marshal() (dAtA []byte, err error)

func (*PowerState) MarshalTo

func (m *PowerState) MarshalTo(dAtA []byte) (int, error)

func (*PowerState) MarshalToSizedBuffer

func (m *PowerState) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*PowerState) ProtoMessage

func (*PowerState) ProtoMessage()

func (*PowerState) Reset

func (m *PowerState) Reset()

func (*PowerState) Size

func (m *PowerState) Size() (n int)

func (*PowerState) String

func (m *PowerState) String() string

func (*PowerState) Unmarshal

func (m *PowerState) Unmarshal(dAtA []byte) error

func (*PowerState) XXX_DiscardUnknown

func (m *PowerState) XXX_DiscardUnknown()

func (*PowerState) XXX_Marshal

func (m *PowerState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PowerState) XXX_Merge

func (m *PowerState) XXX_Merge(src proto.Message)

func (*PowerState) XXX_Size

func (m *PowerState) XXX_Size() int

func (*PowerState) XXX_Unmarshal

func (m *PowerState) XXX_Unmarshal(b []byte) error

type Sensor

type Sensor struct {
	// Addres of the sensor
	Address ObjectAddress `protobuf:"bytes,1,opt,name=address,proto3,customtype=ObjectAddress" json:"address"`
	// Current state of the sensor
	Actual               *SensorState `protobuf:"bytes,2,opt,name=actual,proto3" json:"actual,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

Sensor captures the current value of a sensor with specified address

func (*Sensor) Clone

func (s *Sensor) Clone() *Sensor

Clone the entire object

func (*Sensor) Descriptor

func (*Sensor) Descriptor() ([]byte, []int)

func (*Sensor) Equal

func (s *Sensor) Equal(o *Sensor) bool

Equal returns true when both objects have the same values.

func (*Sensor) GetActual

func (m *Sensor) GetActual() *SensorState

func (*Sensor) GetAddress

func (s *Sensor) GetAddress() ObjectAddress

GetAddress returns the address of the object in a safe manor

func (*Sensor) Marshal

func (m *Sensor) Marshal() (dAtA []byte, err error)

func (*Sensor) MarshalTo

func (m *Sensor) MarshalTo(dAtA []byte) (int, error)

func (*Sensor) MarshalToSizedBuffer

func (m *Sensor) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Sensor) ProtoMessage

func (*Sensor) ProtoMessage()

func (*Sensor) Reset

func (m *Sensor) Reset()

func (*Sensor) Size

func (m *Sensor) Size() (n int)

func (*Sensor) String

func (m *Sensor) String() string

func (*Sensor) Unmarshal

func (m *Sensor) Unmarshal(dAtA []byte) error

func (*Sensor) XXX_DiscardUnknown

func (m *Sensor) XXX_DiscardUnknown()

func (*Sensor) XXX_Marshal

func (m *Sensor) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Sensor) XXX_Merge

func (m *Sensor) XXX_Merge(src proto.Message)

func (*Sensor) XXX_Size

func (m *Sensor) XXX_Size() int

func (*Sensor) XXX_Unmarshal

func (m *Sensor) XXX_Unmarshal(b []byte) error

type SensorState

type SensorState struct {
	// Current value of the sensor
	Value                int32    `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

SensorState captures the current value of a sensor

func (*SensorState) Clone

func (s *SensorState) Clone() *SensorState

Clone the entire object

func (*SensorState) Descriptor

func (*SensorState) Descriptor() ([]byte, []int)

func (*SensorState) Equal

func (s *SensorState) Equal(o *SensorState) bool

Equal returns true when both objects have the same values.

func (*SensorState) GetValue

func (m *SensorState) GetValue() int32

func (*SensorState) Marshal

func (m *SensorState) Marshal() (dAtA []byte, err error)

func (*SensorState) MarshalTo

func (m *SensorState) MarshalTo(dAtA []byte) (int, error)

func (*SensorState) MarshalToSizedBuffer

func (m *SensorState) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*SensorState) ProtoMessage

func (*SensorState) ProtoMessage()

func (*SensorState) Reset

func (m *SensorState) Reset()

func (*SensorState) Size

func (m *SensorState) Size() (n int)

func (*SensorState) String

func (m *SensorState) String() string

func (*SensorState) Unmarshal

func (m *SensorState) Unmarshal(dAtA []byte) error

func (*SensorState) XXX_DiscardUnknown

func (m *SensorState) XXX_DiscardUnknown()

func (*SensorState) XXX_Marshal

func (m *SensorState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SensorState) XXX_Merge

func (m *SensorState) XXX_Merge(src proto.Message)

func (*SensorState) XXX_Size

func (m *SensorState) XXX_Size() int

func (*SensorState) XXX_Unmarshal

func (m *SensorState) XXX_Unmarshal(b []byte) error

type ServiceInfo

type ServiceInfo struct {
	// API version of the service.
	// Currently v1.
	// This is mapped to text field "api_version" in the zeroconf service entry.
	ApiVersion string `protobuf:"bytes,1,opt,name=api_version,json=apiVersion,proto3" json:"api_version,omitempty"`
	// Version of the component providing the service in semantic versioning format.
	// E.g. 1.0.4
	// This is mapped to text field "version" in the zeroconf service entry.
	Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
	// Port number on which the service is offered.
	// This is mapped to the standard port field of the zeroconf service entry.
	ApiPort int32 `protobuf:"varint,3,opt,name=api_port,json=apiPort,proto3" json:"api_port,omitempty"`
	// Address (hostname / IP address) of the service.
	// This is mapped to the standard hostname + address fields of the zeroconf service entry.
	ApiAddress string `protobuf:"bytes,4,opt,name=api_address,json=apiAddress,proto3" json:"api_address,omitempty"`
	// If set, the API is served over TLS.
	// This is mapped to text field "secure" in the zeroconf service entry.
	Secure               bool     `protobuf:"varint,5,opt,name=secure,proto3" json:"secure,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

ServiceInfo is used to standardize service description information.

func ParseServiceInfo

func ParseServiceInfo(se *zeroconf.ServiceEntry) (*ServiceInfo, error)

ParseServiceInfo parses a ServiceEntry into a ServiceInfo message.

func (*ServiceInfo) Descriptor

func (*ServiceInfo) Descriptor() ([]byte, []int)

func (*ServiceInfo) GetApiAddress

func (m *ServiceInfo) GetApiAddress() string

func (*ServiceInfo) GetApiPort

func (m *ServiceInfo) GetApiPort() int32

func (*ServiceInfo) GetApiVersion

func (m *ServiceInfo) GetApiVersion() string

func (*ServiceInfo) GetSecure

func (m *ServiceInfo) GetSecure() bool

func (*ServiceInfo) GetVersion

func (m *ServiceInfo) GetVersion() string

func (*ServiceInfo) Marshal

func (m *ServiceInfo) Marshal() (dAtA []byte, err error)

func (*ServiceInfo) MarshalTo

func (m *ServiceInfo) MarshalTo(dAtA []byte) (int, error)

func (*ServiceInfo) MarshalToSizedBuffer

func (m *ServiceInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ServiceInfo) ProtoMessage

func (*ServiceInfo) ProtoMessage()

func (*ServiceInfo) Reset

func (m *ServiceInfo) Reset()

func (*ServiceInfo) Size

func (m *ServiceInfo) Size() (n int)

func (*ServiceInfo) String

func (m *ServiceInfo) String() string

func (*ServiceInfo) Unmarshal

func (m *ServiceInfo) Unmarshal(dAtA []byte) error

func (*ServiceInfo) XXX_DiscardUnknown

func (m *ServiceInfo) XXX_DiscardUnknown()

func (*ServiceInfo) XXX_Marshal

func (m *ServiceInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ServiceInfo) XXX_Merge

func (m *ServiceInfo) XXX_Merge(src proto.Message)

func (*ServiceInfo) XXX_Size

func (m *ServiceInfo) XXX_Size() int

func (*ServiceInfo) XXX_Unmarshal

func (m *ServiceInfo) XXX_Unmarshal(b []byte) error

type Switch

type Switch struct {
	// Addres of the switch
	Address ObjectAddress `protobuf:"bytes,1,opt,name=address,proto3,customtype=ObjectAddress" json:"address"`
	// Requested state of the switch
	Request *SwitchState `protobuf:"bytes,2,opt,name=request,proto3" json:"request,omitempty"`
	// Actual state of the switch
	Actual               *SwitchState `protobuf:"bytes,3,opt,name=actual,proto3" json:"actual,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

Switch is used to request/report the state of a generic switch.

func (*Switch) Clone

func (s *Switch) Clone() *Switch

Clone the entire object

func (*Switch) Descriptor

func (*Switch) Descriptor() ([]byte, []int)

func (*Switch) Equal

func (s *Switch) Equal(o *Switch) bool

Equal returns true when both objects have the same values.

func (*Switch) GetActual

func (m *Switch) GetActual() *SwitchState

func (*Switch) GetAddress

func (s *Switch) GetAddress() ObjectAddress

GetAddress returns the address of the object in a safe manor

func (*Switch) GetRequest

func (m *Switch) GetRequest() *SwitchState

func (*Switch) Marshal

func (m *Switch) Marshal() (dAtA []byte, err error)

func (*Switch) MarshalTo

func (m *Switch) MarshalTo(dAtA []byte) (int, error)

func (*Switch) MarshalToSizedBuffer

func (m *Switch) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Switch) ProtoMessage

func (*Switch) ProtoMessage()

func (*Switch) Reset

func (m *Switch) Reset()

func (*Switch) Size

func (m *Switch) Size() (n int)

func (*Switch) String

func (m *Switch) String() string

func (*Switch) Unmarshal

func (m *Switch) Unmarshal(dAtA []byte) error

func (*Switch) XXX_DiscardUnknown

func (m *Switch) XXX_DiscardUnknown()

func (*Switch) XXX_Marshal

func (m *Switch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Switch) XXX_Merge

func (m *Switch) XXX_Merge(src proto.Message)

func (*Switch) XXX_Size

func (m *Switch) XXX_Size() int

func (*Switch) XXX_Unmarshal

func (m *Switch) XXX_Unmarshal(b []byte) error

type SwitchDirection

type SwitchDirection int32

Direction of switches

const (
	SwitchDirection_STRAIGHT SwitchDirection = 0
	SwitchDirection_OFF      SwitchDirection = 1
)

func (SwitchDirection) EnumDescriptor

func (SwitchDirection) EnumDescriptor() ([]byte, []int)

func (SwitchDirection) String

func (x SwitchDirection) String() string

type SwitchRequestsOptions

type SwitchRequestsOptions struct {
	// If set, the network master must wait for an actual Output message
	// to confirm the state transition.
	// If not set, the network master assumes the state is effective directly
	// after sending the message.
	ManualConfirm bool `protobuf:"varint,1,opt,name=manual_confirm,json=manualConfirm,proto3" json:"manual_confirm,omitempty"`
	// If set, pass only switch requests that match this module ID.
	ModuleId             string   `protobuf:"bytes,2,opt,name=module_id,json=moduleId,proto3" json:"module_id,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Request arguments for GetSwitchRequests

func (*SwitchRequestsOptions) Descriptor

func (*SwitchRequestsOptions) Descriptor() ([]byte, []int)

func (*SwitchRequestsOptions) GetManualConfirm

func (m *SwitchRequestsOptions) GetManualConfirm() bool

func (*SwitchRequestsOptions) GetModuleId added in v0.9.6

func (m *SwitchRequestsOptions) GetModuleId() string

func (*SwitchRequestsOptions) Marshal

func (m *SwitchRequestsOptions) Marshal() (dAtA []byte, err error)

func (*SwitchRequestsOptions) MarshalTo

func (m *SwitchRequestsOptions) MarshalTo(dAtA []byte) (int, error)

func (*SwitchRequestsOptions) MarshalToSizedBuffer

func (m *SwitchRequestsOptions) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*SwitchRequestsOptions) ProtoMessage

func (*SwitchRequestsOptions) ProtoMessage()

func (*SwitchRequestsOptions) Reset

func (m *SwitchRequestsOptions) Reset()

func (*SwitchRequestsOptions) Size

func (m *SwitchRequestsOptions) Size() (n int)

func (*SwitchRequestsOptions) String

func (m *SwitchRequestsOptions) String() string

func (*SwitchRequestsOptions) Unmarshal

func (m *SwitchRequestsOptions) Unmarshal(dAtA []byte) error

func (*SwitchRequestsOptions) XXX_DiscardUnknown

func (m *SwitchRequestsOptions) XXX_DiscardUnknown()

func (*SwitchRequestsOptions) XXX_Marshal

func (m *SwitchRequestsOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SwitchRequestsOptions) XXX_Merge

func (m *SwitchRequestsOptions) XXX_Merge(src proto.Message)

func (*SwitchRequestsOptions) XXX_Size

func (m *SwitchRequestsOptions) XXX_Size() int

func (*SwitchRequestsOptions) XXX_Unmarshal

func (m *SwitchRequestsOptions) XXX_Unmarshal(b []byte) error

type SwitchState

type SwitchState struct {
	// Requested/current direction of the switch
	Direction SwitchDirection `protobuf:"varint,1,opt,name=direction,proto3,enum=binkynet.v1.SwitchDirection" json:"direction,omitempty"`
	// Set if the switch is currently in use.
	// This can be used to power down a switch if it is not in use.
	IsUsed               bool     `protobuf:"varint,2,opt,name=is_used,json=isUsed,proto3" json:"is_used,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

SwitchState describe the requested/actual state of a generic switch.

func (*SwitchState) Clone

func (s *SwitchState) Clone() *SwitchState

Clone the entire object

func (*SwitchState) Descriptor

func (*SwitchState) Descriptor() ([]byte, []int)

func (*SwitchState) Equal

func (s *SwitchState) Equal(o *SwitchState) bool

Equal returns true when both objects have the same values.

func (*SwitchState) GetDirection

func (m *SwitchState) GetDirection() SwitchDirection

func (*SwitchState) GetIsUsed added in v1.4.2

func (m *SwitchState) GetIsUsed() bool

func (*SwitchState) Marshal

func (m *SwitchState) Marshal() (dAtA []byte, err error)

func (*SwitchState) MarshalTo

func (m *SwitchState) MarshalTo(dAtA []byte) (int, error)

func (*SwitchState) MarshalToSizedBuffer

func (m *SwitchState) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*SwitchState) ProtoMessage

func (*SwitchState) ProtoMessage()

func (*SwitchState) Reset

func (m *SwitchState) Reset()

func (*SwitchState) Size

func (m *SwitchState) Size() (n int)

func (*SwitchState) String

func (m *SwitchState) String() string

func (*SwitchState) Unmarshal

func (m *SwitchState) Unmarshal(dAtA []byte) error

func (*SwitchState) XXX_DiscardUnknown

func (m *SwitchState) XXX_DiscardUnknown()

func (*SwitchState) XXX_Marshal

func (m *SwitchState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SwitchState) XXX_Merge

func (m *SwitchState) XXX_Merge(src proto.Message)

func (*SwitchState) XXX_Size

func (m *SwitchState) XXX_Size() int

func (*SwitchState) XXX_Unmarshal

func (m *SwitchState) XXX_Unmarshal(b []byte) error

type TimePeriod

type TimePeriod int32

TimePeriod indicates time of day in 4 periods.

const (
	TimePeriod_MORNING   TimePeriod = 0
	TimePeriod_AFTERNOON TimePeriod = 1
	TimePeriod_EVENING   TimePeriod = 2
	TimePeriod_NIGHT     TimePeriod = 3
)

func (TimePeriod) EnumDescriptor

func (TimePeriod) EnumDescriptor() ([]byte, []int)

func (TimePeriod) String

func (x TimePeriod) String() string

type TrackInverterState added in v0.9.8

type TrackInverterState int32

TrackInverterState describes the state of the track-inverter as a value in the Output protocol.

const (
	// TrackInverterStateNotConnected means that the track segment is not
	// connected to the main power.
	TrackInverterStateNotConnected TrackInverterState = 0
	// TrackInverterStateDefault means that the track segment is
	// connected to default entry of the inverter.
	TrackInverterStateDefault TrackInverterState = 1
	// TrackInverterStateReverse means that the track segment is
	// connected to reverse entry of the inverter.
	TrackInverterStateReverse TrackInverterState = 2
)

type UnimplementedCommandStationServiceServer

type UnimplementedCommandStationServiceServer struct {
}

UnimplementedCommandStationServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedCommandStationServiceServer) GetInfo

func (*UnimplementedCommandStationServiceServer) Locs added in v0.2.2

func (*UnimplementedCommandStationServiceServer) Power added in v0.2.2

type UnimplementedLocalWorkerServiceServer added in v1.10.0

type UnimplementedLocalWorkerServiceServer struct {
}

UnimplementedLocalWorkerServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedLocalWorkerServiceServer) Reset added in v1.10.0

func (*UnimplementedLocalWorkerServiceServer) SetDeviceDiscoveryRequest added in v1.12.0

func (*UnimplementedLocalWorkerServiceServer) SetDeviceDiscoveryRequest(ctx context.Context, req *DeviceDiscovery) (*Empty, error)

func (*UnimplementedLocalWorkerServiceServer) SetLocRequest added in v1.11.0

func (*UnimplementedLocalWorkerServiceServer) SetLocRequest(ctx context.Context, req *Loc) (*Empty, error)

func (*UnimplementedLocalWorkerServiceServer) SetOutputRequest added in v1.11.0

func (*UnimplementedLocalWorkerServiceServer) SetOutputRequest(ctx context.Context, req *Output) (*Empty, error)

func (*UnimplementedLocalWorkerServiceServer) SetPowerRequest added in v1.11.0

func (*UnimplementedLocalWorkerServiceServer) SetSwitchRequest added in v1.11.0

func (*UnimplementedLocalWorkerServiceServer) SetSwitchRequest(ctx context.Context, req *Switch) (*Empty, error)

type UnimplementedLogProviderServiceServer

type UnimplementedLogProviderServiceServer struct {
}

UnimplementedLogProviderServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedLogProviderServiceServer) GetLogs

type UnimplementedNetworkControlServiceServer

type UnimplementedNetworkControlServiceServer struct {
}

UnimplementedNetworkControlServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedNetworkControlServiceServer) SetClockActual added in v1.0.0

func (*UnimplementedNetworkControlServiceServer) SetDeviceDiscoveryActual added in v1.0.0

func (*UnimplementedNetworkControlServiceServer) SetDeviceDiscoveryActual(ctx context.Context, req *DeviceDiscovery) (*Empty, error)

func (*UnimplementedNetworkControlServiceServer) SetLocActual added in v1.0.0

func (*UnimplementedNetworkControlServiceServer) SetLocalWorkerActual added in v1.0.0

func (*UnimplementedNetworkControlServiceServer) SetLocalWorkerActual(ctx context.Context, req *LocalWorker) (*Empty, error)

func (*UnimplementedNetworkControlServiceServer) SetLocalWorkerRequest added in v1.0.0

func (*UnimplementedNetworkControlServiceServer) SetLocalWorkerRequest(ctx context.Context, req *LocalWorker) (*Empty, error)

func (*UnimplementedNetworkControlServiceServer) SetOutputActual added in v1.0.0

func (*UnimplementedNetworkControlServiceServer) SetPowerActual added in v1.0.0

func (*UnimplementedNetworkControlServiceServer) SetSensorActual added in v1.0.0

func (*UnimplementedNetworkControlServiceServer) SetSwitchActual added in v1.0.0

func (*UnimplementedNetworkControlServiceServer) WatchClock added in v1.0.0

func (*UnimplementedNetworkControlServiceServer) WatchLocalWorkers added in v1.0.0

type WatchOptions added in v1.0.0

type WatchOptions struct {
	// If set, send changes in request state
	WatchRequestChanges bool `protobuf:"varint,1,opt,name=watch_request_changes,json=watchRequestChanges,proto3" json:"watch_request_changes,omitempty"`
	// If set, send changes in actual state
	WatchActualChanges bool `protobuf:"varint,2,opt,name=watch_actual_changes,json=watchActualChanges,proto3" json:"watch_actual_changes,omitempty"`
	// If set, send changes related to this and global module only
	ModuleId             string   `protobuf:"bytes,3,opt,name=module_id,json=moduleId,proto3" json:"module_id,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*WatchOptions) Descriptor added in v1.0.0

func (*WatchOptions) Descriptor() ([]byte, []int)

func (*WatchOptions) GetModuleId added in v1.0.0

func (m *WatchOptions) GetModuleId() string

func (*WatchOptions) GetWatchActualChanges added in v1.0.0

func (m *WatchOptions) GetWatchActualChanges() bool

func (*WatchOptions) GetWatchRequestChanges added in v1.0.0

func (m *WatchOptions) GetWatchRequestChanges() bool

func (*WatchOptions) Marshal added in v1.0.0

func (m *WatchOptions) Marshal() (dAtA []byte, err error)

func (*WatchOptions) MarshalTo added in v1.0.0

func (m *WatchOptions) MarshalTo(dAtA []byte) (int, error)

func (*WatchOptions) MarshalToSizedBuffer added in v1.0.0

func (m *WatchOptions) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*WatchOptions) ProtoMessage added in v1.0.0

func (*WatchOptions) ProtoMessage()

func (*WatchOptions) Reset added in v1.0.0

func (m *WatchOptions) Reset()

func (*WatchOptions) Size added in v1.0.0

func (m *WatchOptions) Size() (n int)

func (*WatchOptions) String added in v1.0.0

func (m *WatchOptions) String() string

func (*WatchOptions) Unmarshal added in v1.0.0

func (m *WatchOptions) Unmarshal(dAtA []byte) error

func (*WatchOptions) XXX_DiscardUnknown added in v1.0.0

func (m *WatchOptions) XXX_DiscardUnknown()

func (*WatchOptions) XXX_Marshal added in v1.0.0

func (m *WatchOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*WatchOptions) XXX_Merge added in v1.0.0

func (m *WatchOptions) XXX_Merge(src proto.Message)

func (*WatchOptions) XXX_Size added in v1.0.0

func (m *WatchOptions) XXX_Size() int

func (*WatchOptions) XXX_Unmarshal added in v1.0.0

func (m *WatchOptions) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL