Documentation
¶
Overview ¶
Connection header
Index ¶
- Constants
- func NewDefaultLogger() *defaultLogger
- type Duration
- func (d *Duration) Add(other Duration) Duration
- func (d *Duration) Cmp(other Duration) int
- func (t *Duration) FromNSec(nsec uint64)
- func (t *Duration) FromSec(sec float64)
- func (t *Duration) IsZero() bool
- func (t *Duration) Normalize()
- func (d *Duration) Sleep() error
- func (d *Duration) Sub(other Duration) Duration
- func (t *Duration) ToNSec() uint64
- func (t *Duration) ToSec() float64
- type LogLevel
- type Logger
- type Message
- type MessageEvent
- type MessageType
- type NameMap
- type NameResolver
- type Node
- type Publisher
- type Rate
- type Service
- type ServiceClient
- type ServiceFactory
- type ServiceHandler
- type ServiceServer
- type ServiceType
- type SingleSubscriberPublisher
- type Subscriber
- type Time
- func (t *Time) Add(d Duration) Time
- func (t *Time) Cmp(other Time) int
- func (t *Time) Diff(from Time) Duration
- func (t *Time) FromNSec(nsec uint64)
- func (t *Time) FromSec(sec float64)
- func (t *Time) IsZero() bool
- func (t *Time) Normalize()
- func (t *Time) Sub(d Duration) Time
- func (t *Time) ToNSec() uint64
- func (t *Time) ToSec() float64
Constants ¶
View Source
const ( Sep = "/" GlobalNS = "/" PrivateNS = "~" )
View Source
const ( ApiStatusError = -1 ApiStatusFailure = 0 ApiStatusSuccess = 1 Remap = ":=" )
View Source
const BufferSize = 1024
Variables ¶
This section is empty.
Functions ¶
func NewDefaultLogger ¶
func NewDefaultLogger() *defaultLogger
Types ¶
type Duration ¶
type Duration struct {
// contains filtered or unexported fields
}
func NewDuration ¶
type Logger ¶
type Logger interface { Severity() LogLevel SetSeverity(severity LogLevel) Debug(v ...interface{}) Debugf(format string, v ...interface{}) Info(v ...interface{}) Infof(format string, v ...interface{}) Warn(v ...interface{}) Warnf(format string, v ...interface{}) Error(v ...interface{}) Errorf(format string, v ...interface{}) Fatal(v ...interface{}) Fatalf(format string, v ...interface{}) }
type MessageEvent ¶
type MessageEvent struct { PublisherName string ReceiptTime time.Time ConnectionHeader map[string]string }
Optional second argument to a Subscriber callback.
type MessageType ¶
type NameResolver ¶
type NameResolver struct {
// contains filtered or unexported fields
}
type Node ¶
type Node interface { NewPublisher(topic string, msgType MessageType) Publisher // Create a publisher which gives you callbacks when subscribers // connect and disconnect. The callbacks are called in their own // goroutines, so they don't need to return immediately to let the // connection proceed. NewPublisherWithCallbacks(topic string, msgType MessageType, connectCallback, disconnectCallback func(SingleSubscriberPublisher)) Publisher // callback should be a function which takes 0, 1, or 2 arguments. // If it takes 0 arguments, it will simply be called without the // message. 1-argument functions are the normal case, and the // argument should be of the generated message type. If the // function takes 2 arguments, the first argument should be of the // generated message type and the second argument should be of // type MessageEvent. NewSubscriber(topic string, msgType MessageType, callback interface{}) Subscriber NewServiceClient(service string, srvType ServiceType) ServiceClient NewServiceServer(service string, srvType ServiceType, callback interface{}) ServiceServer OK() bool SpinOnce() Spin() Shutdown() GetParam(name string) (interface{}, error) SetParam(name string, value interface{}) error HasParam(name string) (bool, error) SearchParam(name string) (string, error) DeleteParam(name string) error Logger() Logger NonRosArgs() []string }
type Rate ¶
type Rate struct {
// contains filtered or unexported fields
}
Impelement Rate interface
func (*Rate) ExpectedCycleTime ¶
type ServiceClient ¶
type ServiceFactory ¶
type ServiceHandler ¶
type ServiceHandler interface{}
type ServiceServer ¶
type ServiceServer interface {
Shutdown()
}
type ServiceType ¶
type ServiceType interface { MD5Sum() string Name() string RequestType() MessageType ResponseType() MessageType NewService() Service }
type SingleSubscriberPublisher ¶
type SingleSubscriberPublisher interface { Publish(msg Message) GetSubscriberName() string GetTopic() string }
A publisher which only sends to one specific subscriber. This is sent as an argument to the connect and disconnect callback functions passed to Node.NewPublisherWithCallbacks().
type Subscriber ¶
type Subscriber interface { GetNumPublishers() int Shutdown() }
Click to show internal directories.
Click to hide internal directories.