v1

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2020 License: Apache-2.0 Imports: 19 Imported by: 5

Documentation

Index

Constants

View Source
const (
	ServiceTypeCommandStation     = "_cs._binkynet._tcp"
	ServiceTypeLocalWorkerControl = "_lwctrl._binkynet._tcp"
	ServiceTypeLocalWorkerConfig  = "_lwcfg._binkynet._tcp"
	ServiceTypeLogProvider        = "_lp._binkynet._tcp"
	ServiceTypeNetworkControl     = "_nwctrl._binkynet._tcp"
)

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 (
	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 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 RegisterLocalWorkerConfigServiceServer

func RegisterLocalWorkerConfigServiceServer(s *grpc.Server, srv LocalWorkerConfigServiceServer)

func RegisterLocalWorkerControlServiceServer

func RegisterLocalWorkerControlServiceServer(s *grpc.Server, srv LocalWorkerControlServiceServer)

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.

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"`
	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) 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)
	// SetPower is used to set the power status of the command station.
	SetPower(ctx context.Context, in *PowerState, opts ...grpc.CallOption) (*Empty, error)
	// GetPowerActuals is used to request a stream of actual power statuses from
	// the command station to the client.
	GetPowerActuals(ctx context.Context, in *Empty, opts ...grpc.CallOption) (CommandStationService_GetPowerActualsClient, error)
	// SetLoc is used to request a loc status from the client to the command station.
	SetLoc(ctx context.Context, in *Loc, opts ...grpc.CallOption) (*Empty, error)
	// GetLocActuals is used to send a stream of actual loc statuses from
	// the command station to the client.
	GetLocActuals(ctx context.Context, in *Empty, opts ...grpc.CallOption) (CommandStationService_GetLocActualsClient, 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)
	// SetPower is used to set the power status of the command station.
	SetPower(context.Context, *PowerState) (*Empty, error)
	// GetPowerActuals is used to request a stream of actual power statuses from
	// the command station to the client.
	GetPowerActuals(*Empty, CommandStationService_GetPowerActualsServer) error
	// SetLoc is used to request a loc status from the client to the command station.
	SetLoc(context.Context, *Loc) (*Empty, error)
	// GetLocActuals is used to send a stream of actual loc statuses from
	// the command station to the client.
	GetLocActuals(*Empty, CommandStationService_GetLocActualsServer) error
}

CommandStationServiceServer is the server API for CommandStationService service.

type CommandStationService_GetLocActualsClient

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

type CommandStationService_GetLocActualsServer

type CommandStationService_GetLocActualsServer interface {
	Send(*Loc) error
	grpc.ServerStream
}

type CommandStationService_GetPowerActualsClient

type CommandStationService_GetPowerActualsClient interface {
	Recv() (*PowerState, error)
	grpc.ClientStream
}

type CommandStationService_GetPowerActualsServer

type CommandStationService_GetPowerActualsServer interface {
	Send(*PowerState) error
	grpc.ServerStream
}

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[string]string `` /* 167-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) Descriptor

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

func (Connection) GetBoolConfig

func (c Connection) GetBoolConfig(key string, defValue bool) bool

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

func (*Connection) GetConfiguration

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

func (Connection) GetIntConfig

func (c Connection) GetIntConfig(key string, defValue int) int

GetIntConfig returns the int-typed configuration value for the given key. If not found or not an int, the given default value 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 string, defValue string) string

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

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"
)

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) Descriptor

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

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) 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 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) Descriptor

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

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) 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"
)

func (DeviceType) Validate

func (t DeviceType) Validate() error

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

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 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"`
	XXX_NoUnkeyedLiteral struct{}  `json:"-"`
	XXX_unrecognized     []byte    `json:"-"`
	XXX_sizecache        int32     `json:"-"`
}

Configuration for a local worker

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) GetAlias

func (m *LocalWorkerConfig) GetAlias() string

func (*LocalWorkerConfig) GetDevices

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

func (*LocalWorkerConfig) GetObjects

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

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) 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 LocalWorkerConfigServiceClient

type LocalWorkerConfigServiceClient interface {
	// GetConfig is used to fetch the configuration for a local worker.
	GetConfig(ctx context.Context, in *LocalWorkerInfo, opts ...grpc.CallOption) (LocalWorkerConfigService_GetConfigClient, error)
}

LocalWorkerConfigServiceClient is the client API for LocalWorkerConfigService service.

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

func NewLocalWorkerConfigServiceClient

func NewLocalWorkerConfigServiceClient(cc *grpc.ClientConn) LocalWorkerConfigServiceClient

type LocalWorkerConfigServiceServer

type LocalWorkerConfigServiceServer interface {
	// GetConfig is used to fetch the configuration for a local worker.
	GetConfig(*LocalWorkerInfo, LocalWorkerConfigService_GetConfigServer) error
}

LocalWorkerConfigServiceServer is the server API for LocalWorkerConfigService service.

type LocalWorkerConfigService_GetConfigClient

type LocalWorkerConfigService_GetConfigClient interface {
	Recv() (*LocalWorkerConfig, error)
	grpc.ClientStream
}

type LocalWorkerConfigService_GetConfigServer

type LocalWorkerConfigService_GetConfigServer interface {
	Send(*LocalWorkerConfig) error
	grpc.ServerStream
}

type LocalWorkerControlServiceClient

type LocalWorkerControlServiceClient interface {
	// Ping messages are send at regular intervals by local workers
	// as a heartbeat notification, as well as providing information about
	// versions.
	Ping(ctx context.Context, in *LocalWorkerInfo, opts ...grpc.CallOption) (*Empty, error)
	// GetPowerRequests is used to get a stream of power requests from the network
	// master.
	GetPowerRequests(ctx context.Context, in *PowerRequestsOptions, opts ...grpc.CallOption) (LocalWorkerControlService_GetPowerRequestsClient, error)
	// SetPowerActuals is used to send a stream of actual power statuses to
	// the network master.
	SetPowerActuals(ctx context.Context, opts ...grpc.CallOption) (LocalWorkerControlService_SetPowerActualsClient, error)
	// GetLocRequests is used to get a stream of loc requests from the network
	// master.
	// Note: Loc.actual field is not set.
	GetLocRequests(ctx context.Context, in *LocRequestsOptions, opts ...grpc.CallOption) (LocalWorkerControlService_GetLocRequestsClient, error)
	// SetLocActuals is used to send a stream of actual loc statuses to
	// the network master.
	// Note: Loc.request field must be set to the latest request.
	SetLocActuals(ctx context.Context, opts ...grpc.CallOption) (LocalWorkerControlService_SetLocActualsClient, error)
	// SetSensorActuals is used to send a stream of actual sensor statuses to
	// the network master.
	SetSensorActuals(ctx context.Context, opts ...grpc.CallOption) (LocalWorkerControlService_SetSensorActualsClient, error)
	// GetOutputRequests is used to get a stream of output requests from the network
	// master.
	GetOutputRequests(ctx context.Context, in *OutputRequestsOptions, opts ...grpc.CallOption) (LocalWorkerControlService_GetOutputRequestsClient, error)
	// SetOutputActuals is used to send a stream of actual output statuses to
	// the network master.
	SetOutputActuals(ctx context.Context, opts ...grpc.CallOption) (LocalWorkerControlService_SetOutputActualsClient, error)
	// GetSwitchRequests is used to get a stream of switch requests from the network
	// master.
	GetSwitchRequests(ctx context.Context, in *SwitchRequestsOptions, opts ...grpc.CallOption) (LocalWorkerControlService_GetSwitchRequestsClient, error)
	// SetSwitchActuals is used to send a stream of actual switch statuses to
	// the network master.
	SetSwitchActuals(ctx context.Context, opts ...grpc.CallOption) (LocalWorkerControlService_SetSwitchActualsClient, error)
	// GetClock is used to get a stream of switch current time of day from the network
	// master.
	GetClock(ctx context.Context, in *Empty, opts ...grpc.CallOption) (LocalWorkerControlService_GetClockClient, error)
}

LocalWorkerControlServiceClient is the client API for LocalWorkerControlService service.

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

func NewLocalWorkerControlServiceClient

func NewLocalWorkerControlServiceClient(cc *grpc.ClientConn) LocalWorkerControlServiceClient

type LocalWorkerControlServiceServer

type LocalWorkerControlServiceServer interface {
	// Ping messages are send at regular intervals by local workers
	// as a heartbeat notification, as well as providing information about
	// versions.
	Ping(context.Context, *LocalWorkerInfo) (*Empty, error)
	// GetPowerRequests is used to get a stream of power requests from the network
	// master.
	GetPowerRequests(*PowerRequestsOptions, LocalWorkerControlService_GetPowerRequestsServer) error
	// SetPowerActuals is used to send a stream of actual power statuses to
	// the network master.
	SetPowerActuals(LocalWorkerControlService_SetPowerActualsServer) error
	// GetLocRequests is used to get a stream of loc requests from the network
	// master.
	// Note: Loc.actual field is not set.
	GetLocRequests(*LocRequestsOptions, LocalWorkerControlService_GetLocRequestsServer) error
	// SetLocActuals is used to send a stream of actual loc statuses to
	// the network master.
	// Note: Loc.request field must be set to the latest request.
	SetLocActuals(LocalWorkerControlService_SetLocActualsServer) error
	// SetSensorActuals is used to send a stream of actual sensor statuses to
	// the network master.
	SetSensorActuals(LocalWorkerControlService_SetSensorActualsServer) error
	// GetOutputRequests is used to get a stream of output requests from the network
	// master.
	GetOutputRequests(*OutputRequestsOptions, LocalWorkerControlService_GetOutputRequestsServer) error
	// SetOutputActuals is used to send a stream of actual output statuses to
	// the network master.
	SetOutputActuals(LocalWorkerControlService_SetOutputActualsServer) error
	// GetSwitchRequests is used to get a stream of switch requests from the network
	// master.
	GetSwitchRequests(*SwitchRequestsOptions, LocalWorkerControlService_GetSwitchRequestsServer) error
	// SetSwitchActuals is used to send a stream of actual switch statuses to
	// the network master.
	SetSwitchActuals(LocalWorkerControlService_SetSwitchActualsServer) error
	// GetClock is used to get a stream of switch current time of day from the network
	// master.
	GetClock(*Empty, LocalWorkerControlService_GetClockServer) error
}

LocalWorkerControlServiceServer is the server API for LocalWorkerControlService service.

type LocalWorkerControlService_GetClockClient

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

type LocalWorkerControlService_GetClockServer

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

type LocalWorkerControlService_GetLocRequestsClient

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

type LocalWorkerControlService_GetLocRequestsServer

type LocalWorkerControlService_GetLocRequestsServer interface {
	Send(*Loc) error
	grpc.ServerStream
}

type LocalWorkerControlService_GetOutputRequestsClient

type LocalWorkerControlService_GetOutputRequestsClient interface {
	Recv() (*Output, error)
	grpc.ClientStream
}

type LocalWorkerControlService_GetOutputRequestsServer

type LocalWorkerControlService_GetOutputRequestsServer interface {
	Send(*Output) error
	grpc.ServerStream
}

type LocalWorkerControlService_GetPowerRequestsClient

type LocalWorkerControlService_GetPowerRequestsClient interface {
	Recv() (*PowerState, error)
	grpc.ClientStream
}

type LocalWorkerControlService_GetPowerRequestsServer

type LocalWorkerControlService_GetPowerRequestsServer interface {
	Send(*PowerState) error
	grpc.ServerStream
}

type LocalWorkerControlService_GetSwitchRequestsClient

type LocalWorkerControlService_GetSwitchRequestsClient interface {
	Recv() (*Switch, error)
	grpc.ClientStream
}

type LocalWorkerControlService_GetSwitchRequestsServer

type LocalWorkerControlService_GetSwitchRequestsServer interface {
	Send(*Switch) error
	grpc.ServerStream
}

type LocalWorkerControlService_SetLocActualsClient

type LocalWorkerControlService_SetLocActualsClient interface {
	Send(*Loc) error
	CloseAndRecv() (*Empty, error)
	grpc.ClientStream
}

type LocalWorkerControlService_SetLocActualsServer

type LocalWorkerControlService_SetLocActualsServer interface {
	SendAndClose(*Empty) error
	Recv() (*Loc, error)
	grpc.ServerStream
}

type LocalWorkerControlService_SetOutputActualsClient

type LocalWorkerControlService_SetOutputActualsClient interface {
	Send(*Output) error
	CloseAndRecv() (*Empty, error)
	grpc.ClientStream
}

type LocalWorkerControlService_SetOutputActualsServer

type LocalWorkerControlService_SetOutputActualsServer interface {
	SendAndClose(*Empty) error
	Recv() (*Output, error)
	grpc.ServerStream
}

type LocalWorkerControlService_SetPowerActualsClient

type LocalWorkerControlService_SetPowerActualsClient interface {
	Send(*PowerState) error
	CloseAndRecv() (*Empty, error)
	grpc.ClientStream
}

type LocalWorkerControlService_SetPowerActualsServer

type LocalWorkerControlService_SetPowerActualsServer interface {
	SendAndClose(*Empty) error
	Recv() (*PowerState, error)
	grpc.ServerStream
}

type LocalWorkerControlService_SetSensorActualsClient

type LocalWorkerControlService_SetSensorActualsClient interface {
	Send(*Sensor) error
	CloseAndRecv() (*Empty, error)
	grpc.ClientStream
}

type LocalWorkerControlService_SetSensorActualsServer

type LocalWorkerControlService_SetSensorActualsServer interface {
	SendAndClose(*Empty) error
	Recv() (*Sensor, error)
	grpc.ServerStream
}

type LocalWorkerControlService_SetSwitchActualsClient

type LocalWorkerControlService_SetSwitchActualsClient interface {
	Send(*Switch) error
	CloseAndRecv() (*Empty, error)
	grpc.ClientStream
}

type LocalWorkerControlService_SetSwitchActualsServer

type LocalWorkerControlService_SetSwitchActualsServer interface {
	SendAndClose(*Empty) error
	Recv() (*Switch, error)
	grpc.ServerStream
}

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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Information about the local worker

func (*LocalWorkerInfo) Descriptor

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

func (*LocalWorkerInfo) GetDescription

func (m *LocalWorkerInfo) GetDescription() string

func (*LocalWorkerInfo) GetId

func (m *LocalWorkerInfo) GetId() 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 LogEntry

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

func (*LogEntry) Descriptor

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

func (*LogEntry) GetMessage

func (m *LogEntry) GetMessage() string

func (*LogEntry) GetString_

func (m *LogEntry) GetString_() LogLevel

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 {
	// Power is used to send power requests and receive power request & actual changes.
	Power(ctx context.Context, opts ...grpc.CallOption) (NetworkControlService_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) (NetworkControlService_LocsClient, error)
	// Sensors is used to receive a stream of actual sensor states.
	Sensors(ctx context.Context, in *Empty, opts ...grpc.CallOption) (NetworkControlService_SensorsClient, error)
	// Outputs is used to control outputs and get changes in output requests & actual state back.
	// Note: Output.actual on incoming objects is ignored.
	Outputs(ctx context.Context, opts ...grpc.CallOption) (NetworkControlService_OutputsClient, error)
	// Switches is used to control switches and get changes in switch requests & actual state back.
	// Note: Switche.actual on incoming objects is ignored.
	Switches(ctx context.Context, opts ...grpc.CallOption) (NetworkControlService_SwitchesClient, error)
	// Clock is used to send clock requests and receive clock changes.
	Clock(ctx context.Context, opts ...grpc.CallOption) (NetworkControlService_ClockClient, 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 {
	// Power is used to send power requests and receive power request & actual changes.
	Power(NetworkControlService_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(NetworkControlService_LocsServer) error
	// Sensors is used to receive a stream of actual sensor states.
	Sensors(*Empty, NetworkControlService_SensorsServer) error
	// Outputs is used to control outputs and get changes in output requests & actual state back.
	// Note: Output.actual on incoming objects is ignored.
	Outputs(NetworkControlService_OutputsServer) error
	// Switches is used to control switches and get changes in switch requests & actual state back.
	// Note: Switche.actual on incoming objects is ignored.
	Switches(NetworkControlService_SwitchesServer) error
	// Clock is used to send clock requests and receive clock changes.
	Clock(NetworkControlService_ClockServer) error
}

NetworkControlServiceServer is the server API for NetworkControlService service.

type NetworkControlService_ClockClient

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

type NetworkControlService_ClockServer

type NetworkControlService_ClockServer interface {
	Send(*Clock) error
	Recv() (*Clock, error)
	grpc.ServerStream
}

type NetworkControlService_LocsClient

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

type NetworkControlService_LocsServer

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

type NetworkControlService_OutputsClient

type NetworkControlService_OutputsClient interface {
	Send(*Output) error
	Recv() (*Output, error)
	grpc.ClientStream
}

type NetworkControlService_OutputsServer

type NetworkControlService_OutputsServer interface {
	Send(*Output) error
	Recv() (*Output, error)
	grpc.ServerStream
}

type NetworkControlService_PowerClient

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

type NetworkControlService_PowerServer

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

type NetworkControlService_SensorsClient

type NetworkControlService_SensorsClient interface {
	Recv() (*Sensor, error)
	grpc.ClientStream
}

type NetworkControlService_SensorsServer

type NetworkControlService_SensorsServer interface {
	Send(*Sensor) error
	grpc.ServerStream
}

type NetworkControlService_SwitchesClient

type NetworkControlService_SwitchesClient interface {
	Send(*Switch) error
	Recv() (*Switch, error)
	grpc.ClientStream
}

type NetworkControlService_SwitchesServer

type NetworkControlService_SwitchesServer interface {
	Send(*Switch) error
	Recv() (*Switch, 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"`
	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) 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) 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) GetType

func (s *Object) GetType() ObjectType

GetType returns the type of the object in a safe manor

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.

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"
	// 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"
)

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"`
	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) 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"`
	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) 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"`
	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) 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 UnimplementedCommandStationServiceServer

type UnimplementedCommandStationServiceServer struct {
}

UnimplementedCommandStationServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedCommandStationServiceServer) GetInfo

func (*UnimplementedCommandStationServiceServer) GetLocActuals

func (*UnimplementedCommandStationServiceServer) GetPowerActuals

func (*UnimplementedCommandStationServiceServer) SetLoc

func (*UnimplementedCommandStationServiceServer) SetPower

type UnimplementedLocalWorkerConfigServiceServer

type UnimplementedLocalWorkerConfigServiceServer struct {
}

UnimplementedLocalWorkerConfigServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedLocalWorkerConfigServiceServer) GetConfig

type UnimplementedLocalWorkerControlServiceServer

type UnimplementedLocalWorkerControlServiceServer struct {
}

UnimplementedLocalWorkerControlServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedLocalWorkerControlServiceServer) GetClock

func (*UnimplementedLocalWorkerControlServiceServer) GetLocRequests

func (*UnimplementedLocalWorkerControlServiceServer) GetOutputRequests

func (*UnimplementedLocalWorkerControlServiceServer) GetPowerRequests

func (*UnimplementedLocalWorkerControlServiceServer) GetSwitchRequests

func (*UnimplementedLocalWorkerControlServiceServer) Ping

func (*UnimplementedLocalWorkerControlServiceServer) SetLocActuals

func (*UnimplementedLocalWorkerControlServiceServer) SetOutputActuals

func (*UnimplementedLocalWorkerControlServiceServer) SetPowerActuals

func (*UnimplementedLocalWorkerControlServiceServer) SetSensorActuals

func (*UnimplementedLocalWorkerControlServiceServer) SetSwitchActuals

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) Clock

func (*UnimplementedNetworkControlServiceServer) Locs

func (*UnimplementedNetworkControlServiceServer) Outputs

func (*UnimplementedNetworkControlServiceServer) Power

func (*UnimplementedNetworkControlServiceServer) Sensors

func (*UnimplementedNetworkControlServiceServer) Switches

Jump to

Keyboard shortcuts

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