Documentation
¶
Overview ¶
Package navlink is a VDA5050 protocol access SDK for Go.
It provides MQTT connectivity, a single TopicResolver, typed inbound handlers (OnState / OnConnection / …), and typed outbound publishing via AGVHandle. Scheduling and domain orchestration stay outside this package.
Index ¶
- Constants
- func IsOutboundValidationFailed(err error) bool
- func IsPublishBrokerRejected(err error) bool
- func IsPublishCanceled(err error) bool
- func IsPublishNotStarted(err error) bool
- func IsPublishQoSRejected(err error) bool
- func IsPublishTimeout(err error) bool
- func IsPublishValidationFailed(err error) bool
- func MarkPublishAttempted(err error) error
- func PublishAccepted(err error) bool
- func QoSOf(q byte) *byte
- type AGVHandle
- func (a *AGVHandle) CancelOrder(ctx context.Context, headerID uint32, actionID string) (PublishResult, error)
- func (a *AGVHandle) FactsheetRequest(ctx context.Context, headerID uint32, actionID string) (PublishResult, error)
- func (a *AGVHandle) InitPosition(ctx context.Context, headerID uint32, actionID string, p InitPositionParams) (PublishResult, error)
- func (a *AGVHandle) PublishInstantActions(ctx context.Context, ia *instant_actions.InstantActions) (PublishResult, error)
- func (a *AGVHandle) PublishOrder(ctx context.Context, o *order.Order) (PublishResult, error)
- func (a *AGVHandle) StartCharging(ctx context.Context, headerID uint32, actionID string) (PublishResult, error)
- func (a *AGVHandle) StartPause(ctx context.Context, headerID uint32, actionID string) (PublishResult, error)
- func (a *AGVHandle) StateRequest(ctx context.Context, headerID uint32, actionID string) (PublishResult, error)
- func (a *AGVHandle) StopCharging(ctx context.Context, headerID uint32, actionID string) (PublishResult, error)
- func (a *AGVHandle) StopPause(ctx context.Context, headerID uint32, actionID string) (PublishResult, error)
- type Client
- func (c *Client) AGV(manufacturer, serial string) *AGVHandle
- func (c *Client) Connected() bool
- func (c *Client) Emit(event string, payload any) error
- func (c *Client) EventBus() EventBus
- func (c *Client) OnAGVOffline(h func(Identity))
- func (c *Client) OnAGVOnline(h func(Identity))
- func (c *Client) OnConnection(h ConnectionHandler)
- func (c *Client) OnFactsheet(h FactsheetHandler)
- func (c *Client) OnHandlerError(h HandlerErrorHandler)
- func (c *Client) OnState(h StateHandler)
- func (c *Client) OnSubscriptionsRestored(h func(error))
- func (c *Client) OnTopic(filter string, h TopicHandler)
- func (c *Client) OnTransportDown(h func(error))
- func (c *Client) OnTransportUp(h func())
- func (c *Client) OnVisualization(h VisualizationHandler)
- func (c *Client) RestoreFleet(ctx context.Context) error
- func (c *Client) Start(ctx context.Context) error
- func (c *Client) Stop(ctx context.Context) error
- func (c *Client) Subscribe(event string, h EventHandler) (Unsubscribe, error)
- func (c *Client) Topics() topic.Resolver
- func (c *Client) Track(ctx context.Context, manufacturer, serial string) error
- func (c *Client) Transport() Transport
- func (c *Client) Untrack(ctx context.Context, manufacturer, serial string) error
- func (c *Client) UseEventBus(bus EventBus)
- type Config
- type ConnectionEvent
- type ConnectionHandler
- type ConnectionLostAware
- type ConnectionStatus
- type DecodeErrorHandler
- type DecodeFailedEvent
- type Envelope
- type EventBus
- type EventHandler
- type FactsheetEvent
- type FactsheetHandler
- type FleetOptions
- type HandlerErrorHandler
- type HeaderSequencePolicy
- type HeaderSummary
- type Identity
- type IdentityMapper
- type InboundDisposition
- type InboundDropReason
- type InboundPolicy
- type InboundSlowCause
- type InitPositionParams
- type LastWill
- type Meta
- type OutboundValidation
- type PublishOptions
- type PublishOutcome
- type PublishResult
- type RawHandler
- type ReconnectAware
- type StateEvent
- type StateHandler
- type TopicHandler
- type Transport
- type Unsubscribe
- type VisualizationEvent
- type VisualizationHandler
Constants ¶
const ( EventStateReceived = "vda.state.received" EventConnectionChanged = "vda.connection.changed" EventVisualizationReceived = "vda.visualization.received" EventFactsheetReceived = "vda.factsheet.received" EventDecodeFailed = "vda.decode.failed" )
L1 protocol event names (stable; do not rename casually).
const ( ReasonHeaderIDZero = "headerId_zero" ReasonOrderIDEmpty = "orderId_empty" ReasonOrderUpdateIDZero = "orderUpdateId_zero" ReasonActionIDEmpty = "actionId_empty" ReasonIdentityMismatch = "identity_mismatch" )
Outbound validation reason keys (metadata "reason" on OutboundValidationFailed).
const DefaultOrderQoS byte = 1
DefaultOrderQoS is used for order / instantActions (and non-viz subscribe) when Config.QoS is nil.
const MetaInboundDisposition = "navlink.inboundDisposition"
MetaInboundDisposition is set on Envelope.Meta when an InboundPolicy is configured.
Variables ¶
This section is empty.
Functions ¶
func IsOutboundValidationFailed ¶
IsOutboundValidationFailed reports a rejected bad outbound packet (not a broker failure).
func IsPublishBrokerRejected ¶
IsPublishBrokerRejected reports broker/token rejection after the wait completed.
func IsPublishCanceled ¶
IsPublishCanceled reports context cancellation (not a timeout).
func IsPublishNotStarted ¶
IsPublishNotStarted reports ClientNotStarted (or transport not running).
func IsPublishQoSRejected ¶
IsPublishQoSRejected reports an unsupported QoS level.
func IsPublishTimeout ¶
IsPublishTimeout reports a publish wait timeout or context deadline. context.Canceled is not a timeout; use IsPublishCanceled.
func IsPublishValidationFailed ¶
IsPublishValidationFailed reports light outbound validation rejection (bad packet). Distinct from broker reject — safe to fix the packet; usually not a same-ID retry case.
func MarkPublishAttempted ¶
MarkPublishAttempted records that MQTT Publish was already invoked. Timeout / cancel on the wrapped error classify as Uncertain.
func PublishAccepted ¶
PublishAccepted reports whether the MQTT broker accepted the publish for the configured QoS (token wait completed without error). Equivalent to err == nil. This is not vehicle-side order acceptance — that still comes from inbound state. Platforms should call RecordSuccessfulPublish only when this is true.
Types ¶
type AGVHandle ¶
type AGVHandle struct {
// contains filtered or unexported fields
}
AGVHandle publishes typed outbound messages to one AGV. Callers must assign headerId / orderUpdateId / actionId before publish.
func (*AGVHandle) CancelOrder ¶
func (a *AGVHandle) CancelOrder(ctx context.Context, headerID uint32, actionID string) (PublishResult, error)
CancelOrder publishes a standard cancelOrder instantAction. actionID and headerID must be supplied by the caller (orchestration layer).
func (*AGVHandle) FactsheetRequest ¶
func (a *AGVHandle) FactsheetRequest(ctx context.Context, headerID uint32, actionID string) (PublishResult, error)
FactsheetRequest publishes a standard factsheetRequest instantAction. This action is defined by VDA5050 2.1.0; the library does not gate it on Config.Version.
func (*AGVHandle) InitPosition ¶
func (a *AGVHandle) InitPosition(ctx context.Context, headerID uint32, actionID string, p InitPositionParams) (PublishResult, error)
InitPosition publishes a standard initPosition instantAction.
func (*AGVHandle) PublishInstantActions ¶
func (a *AGVHandle) PublishInstantActions(ctx context.Context, ia *instant_actions.InstantActions) (PublishResult, error)
PublishInstantActions publishes instantActions. Caller owns HeaderId and actionIds. See PublishOrder for success/failure semantics and PublishResult usage.
func (*AGVHandle) PublishOrder ¶
PublishOrder publishes an order. Caller owns HeaderId and OrderUpdateId. On success, PublishResult describes the bytes/topic actually sent; on failure result may be zero or partially filled (topic/payload prepared before transport).
err == nil (PublishAccepted) means the MQTT QoS handshake succeeded (broker accepted the publish). It does not mean the vehicle accepted the order — that is still observed via inbound state. Platforms may RecordSuccessfulPublish only on accepted publish; navlink never records for them.
func (*AGVHandle) StartCharging ¶
func (a *AGVHandle) StartCharging(ctx context.Context, headerID uint32, actionID string) (PublishResult, error)
StartCharging publishes the official startCharging instantAction (no parameters). Vendor-specific charging parameters are not part of this helper; use PublishInstantActions.
func (*AGVHandle) StartPause ¶
func (a *AGVHandle) StartPause(ctx context.Context, headerID uint32, actionID string) (PublishResult, error)
StartPause publishes a standard startPause instantAction.
func (*AGVHandle) StateRequest ¶
func (a *AGVHandle) StateRequest(ctx context.Context, headerID uint32, actionID string) (PublishResult, error)
StateRequest publishes a standard stateRequest instantAction.
func (*AGVHandle) StopCharging ¶
func (a *AGVHandle) StopCharging(ctx context.Context, headerID uint32, actionID string) (PublishResult, error)
StopCharging publishes the official stopCharging instantAction (no parameters).
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is the VDA5050 protocol access entrypoint.
func (*Client) Connected ¶
Connected reports whether the transport currently has an MQTT connection.
func (*Client) OnAGVOffline ¶
OnAGVOffline registers a FleetSession offline hook (no-op when Fleet is disabled).
func (*Client) OnAGVOnline ¶
OnAGVOnline registers a FleetSession online hook (no-op when Fleet is disabled).
func (*Client) OnConnection ¶
func (c *Client) OnConnection(h ConnectionHandler)
OnConnection registers a typed connection handler.
func (*Client) OnFactsheet ¶
func (c *Client) OnFactsheet(h FactsheetHandler)
OnFactsheet registers a typed factsheet handler.
func (*Client) OnHandlerError ¶
func (c *Client) OnHandlerError(h HandlerErrorHandler)
OnHandlerError registers a callback when a typed/raw inbound handler returns an error.
func (*Client) OnState ¶
func (c *Client) OnState(h StateHandler)
OnState registers a typed state handler (may be called before Start). The handler runs on the inbound worker and must return quickly; see StateHandler. With an EventBus attached, the handler is registered on EventStateReceived.
func (*Client) OnSubscriptionsRestored ¶
OnSubscriptionsRestored registers a callback after reconnect subscription restore.
func (*Client) OnTopic ¶
func (c *Client) OnTopic(filter string, h TopicHandler)
OnTopic registers a raw/escape-hatch topic filter handler.
func (*Client) OnTransportDown ¶
OnTransportDown registers a callback for unexpected transport disconnects.
func (*Client) OnTransportUp ¶
func (c *Client) OnTransportUp(h func())
OnTransportUp registers a callback after a successful connect or restore.
func (*Client) OnVisualization ¶
func (c *Client) OnVisualization(h VisualizationHandler)
OnVisualization registers a typed visualization handler.
func (*Client) RestoreFleet ¶
RestoreFleet re-subscribes fleet connection and tracked AGVs after reconnect.
func (*Client) Start ¶
Start connects the transport and establishes subscriptions for registered handlers.
func (*Client) Subscribe ¶
func (c *Client) Subscribe(event string, h EventHandler) (Unsubscribe, error)
Subscribe registers a handler for an event name (L1 or platform custom). Subscribing to an L1 event also marks the corresponding MQTT channel as wanted.
func (*Client) Track ¶
Track manually tracks an AGV (subscribes per-AGV channels). Requires Fleet. Call from a platform goroutine/queue — not from an On* inbound handler.
func (*Client) Transport ¶
Transport returns the byte-level transport. Use this for non-VDA application MQTT; do not mix raw traffic into AGV helpers.
func (*Client) UseEventBus ¶
UseEventBus attaches a bus and migrates any already-registered On* handlers onto it. After this call, On* registers as bus subscribers; inbound messages Publish to the bus.
type Config ¶
type Config struct {
// Broker is the MQTT broker URL, e.g. tcp://localhost:1883.
// Required unless Transport is provided.
Broker string
// ClientID is the MQTT client id. Required unless Transport is provided.
ClientID string
Username string
Password string
// Interface is the VDA topic prefix (e.g. uagv / vda5050). Required.
Interface string
// Version is the VDA topic version segment (e.g. v2 / v2.0.0). Required.
Version string
// HeaderVersion is written into outbound ProtocolHeader.Version for Order and
// InstantActions. Empty means Version is used (same Client policy for both).
HeaderVersion string
// Manufacturer / SerialNumber optionally pin subscriptions to one AGV.
// Empty means fleet-level `+` wildcards for channels with handlers.
Manufacturer string
SerialNumber string
// QoS is the MQTT QoS for publishes and subscriptions.
// nil = library defaults (order/instantActions publish 1; visualization subscribe 0).
// A pointer to 0 is a real QoS 0 (not "unset").
QoS *byte
KeepAlive time.Duration
ConnectTimeout time.Duration
CleanSession bool
AutoReconnect bool
TLS *tls.Config
Will *LastWill
// InboundQueueSize is each inbound lane/shard queue length (default 256).
InboundQueueSize int
// OnInboundDrop is called when an inbound queue is full.
// InboundDropped: message discarded (visualization).
// InboundBackpressured: callback will block until space (message not lost).
OnInboundDrop func(topic string, reason InboundDropReason)
// SlowInbound, if > 0, invokes OnSlowInbound when queue wait or handler
// runtime meets the threshold. Handlers still run synchronously on the
// inbound worker; this is observability only.
SlowInbound time.Duration
OnSlowInbound func(env Envelope, cause InboundSlowCause, d time.Duration)
// RestoreSubscriptionsOnReconnect re-subscribes VDA topics after MQTT reconnect.
// Default true. Applies when the transport implements ReconnectAware (built-in MQTT,
// testkit FakeBroker). FleetSession uses Restore; other subscriptions are recreated.
RestoreSubscriptionsOnReconnect *bool
// StrictIdentity validates payload manufacturer/serial against the topic (default true).
StrictIdentity *bool
// Transport injects a custom transport (tests / shared connection).
// When nil, an MQTT transport is created from Broker settings.
Transport Transport
// Fleet enables fleet tracking when non-nil.
// Pass &DefaultFleetOptions() or a customized FleetOptions.
// An all-zero FleetOptions is treated as DefaultFleetOptions().
Fleet *FleetOptions
// Extensions fills Envelope.Meta from vendor fields (optional).
Extensions *extend.Registry
// Bus is an optional EventBus (same as Client.UseEventBus).
Bus EventBus
// IdentityMapper optionally fills Envelope.RobotID.
IdentityMapper IdentityMapper
// OutboundValidation configures light pre-publish checks. Nil = enabled defaults
// (reject headerId 0, empty orderId, orderUpdateId 0, empty actionId, identity mismatch).
OutboundValidation *OutboundValidation
// InboundPolicy optionally classifies inbound headerId (Accept/Stale/Duplicate).
// Nil = accept-all. Classification is annotated on Envelope; messages are not dropped.
InboundPolicy InboundPolicy
// OnDecodeError is called when decode or identity checks fail.
OnDecodeError DecodeErrorHandler
// OnHandlerError is called when a typed/raw handler returns an error.
OnHandlerError HandlerErrorHandler
OnTransportUp func()
OnTransportDown func(error)
// OnSubscriptionsRestored is called after reconnect restore (nil err = success).
OnSubscriptionsRestored func(error)
}
Config configures a navlink Client.
type ConnectionEvent ¶
type ConnectionEvent struct {
Envelope Envelope
Connection *connection.Connection
}
ConnectionEvent is the payload for EventConnectionChanged.
type ConnectionHandler ¶
type ConnectionHandler func(ctx context.Context, env Envelope, msg *connection.Connection) error
ConnectionHandler handles a decoded connection message. Same rules as StateHandler. Do not Client.Track / Subscribe here; use a platform queue or explicit Track outside the inbound path.
type ConnectionLostAware ¶
type ConnectionLostAware interface {
SetOnConnectionLost(fn func(error))
}
ConnectionLostAware is implemented by transports that can signal unexpected disconnects.
type ConnectionStatus ¶
type ConnectionStatus interface {
Connected() bool
}
ConnectionStatus reports whether the transport is currently connected.
type DecodeErrorHandler ¶
DecodeErrorHandler observes decode/identity failures without crashing the process.
type DecodeFailedEvent ¶
DecodeFailedEvent is the payload for EventDecodeFailed.
type Envelope ¶
type Envelope struct {
AGV Identity
Topic string
Channel topic.Channel
Raw []byte
// ReceivedAt is when the MQTT callback enqueued the payload (UTC).
// Transports without a queue (FakeBroker) set it to the same instant as DispatchedAt.
ReceivedAt time.Time
// DispatchedAt is when the inbound worker started handling the message (UTC).
DispatchedAt time.Time
Header HeaderSummary
Meta Meta
RobotID string // filled when Config.IdentityMapper is set
// InboundDisposition is set when Config.InboundPolicy is configured.
// Empty means unclassified (default accept-all).
InboundDisposition InboundDisposition
}
Envelope is the inbound message shell around a typed VDA5050 payload.
type EventBus ¶
type EventBus interface {
Publish(ctx context.Context, event string, payload any) error
Subscribe(event string, h EventHandler) (Unsubscribe, error)
}
EventBus is the optional protocol/custom event surface.
func NewMemoryEventBus ¶
func NewMemoryEventBus() EventBus
NewMemoryEventBus returns a process-local synchronous EventBus.
type EventHandler ¶
EventHandler handles a bus event payload.
type FactsheetEvent ¶
FactsheetEvent is the payload for EventFactsheetReceived.
type FactsheetHandler ¶
FactsheetHandler handles a decoded factsheet message.
type FleetOptions ¶
type FleetOptions struct {
// SubscribeState subscribes per-AGV state topics when tracked (default true).
SubscribeState bool
// SubscribeVisualization subscribes per-AGV visualization when tracked.
SubscribeVisualization bool
// AutoTrackFromConnection, when true, Track/Untrack from connection state on a
// dedicated worker (not the inbound typed path). Default false: prefer explicit
// Client.Track from the platform. See docs/INBOUND_BOUNDARY.md.
AutoTrackFromConnection bool
}
FleetOptions configures per-AGV subscriptions when Config.Fleet is set.
func DefaultFleetOptions ¶
func DefaultFleetOptions() FleetOptions
DefaultFleetOptions returns the recommended fleet defaults.
type HandlerErrorHandler ¶
HandlerErrorHandler observes inbound handler errors without crashing the process.
type HeaderSequencePolicy ¶
type HeaderSequencePolicy struct {
// contains filtered or unexported fields
}
HeaderSequencePolicy tracks the last accepted headerId per key and classifies equal as Duplicate and lower as Stale. It does not drop messages.
func NewHeaderSequencePolicy ¶
func NewHeaderSequencePolicy() *HeaderSequencePolicy
NewHeaderSequencePolicy returns a policy that updates watermarks on Accept only.
func (*HeaderSequencePolicy) Classify ¶
func (p *HeaderSequencePolicy) Classify(agv Identity, channel topic.Channel, headerID uint32) InboundDisposition
Classify implements InboundPolicy.
type HeaderSummary ¶
type HeaderSummary struct {
HeaderID uint32
Timestamp string
Version string
Manufacturer string
SerialNumber string
}
HeaderSummary is a small decode of common VDA5050 header fields.
type IdentityMapper ¶
IdentityMapper maps protocol identity (mfr+sn) to a platform robot ID. Injected by the platform on Config; fills Envelope.RobotID on inbound paths. navlink never invents robot IDs and does not reverse-map for outbound — callers still publish via AGV(mfr, sn).
type InboundDisposition ¶
type InboundDisposition string
InboundDisposition is a light headerId classification for packet acceptance. navlink does not accept/reject business semantics — platforms decide whether to drop.
const ( InboundAccept InboundDisposition = "accept" InboundStale InboundDisposition = "stale" InboundDuplicate InboundDisposition = "duplicate" )
type InboundDropReason ¶ added in v0.9.4
type InboundDropReason int
InboundDropReason explains why OnInboundDrop fired.
const ( // InboundDropped means the message was discarded (visualization when the // inbound queue is full). InboundDropped InboundDropReason = iota // InboundBackpressured means the queue is full; the MQTT callback will // block until space is available (or the transport stops). The message is // not discarded. InboundBackpressured )
func (InboundDropReason) String ¶ added in v0.9.4
func (r InboundDropReason) String() string
type InboundPolicy ¶
type InboundPolicy interface {
Classify(agv Identity, channel topic.Channel, headerID uint32) InboundDisposition
}
InboundPolicy classifies inbound messages by headerId for one (mfr, sn, channel). Default (nil Config.InboundPolicy) is accept-all — no classification.
type InboundSlowCause ¶ added in v0.9.1
type InboundSlowCause int
InboundSlowCause says which inbound phase exceeded Config.SlowInbound.
const ( // InboundSlowQueue: time in the MQTT inbound queue before the worker ran. InboundSlowQueue InboundSlowCause = iota // InboundSlowHandler: time spent in decode + On* / OnTopic. InboundSlowHandler )
func (InboundSlowCause) String ¶ added in v0.9.1
func (c InboundSlowCause) String() string
type InitPositionParams ¶
InitPositionParams is the VDA5050 initPosition parameter set (2.0 / 2.1). Keys on the wire are x, y, theta, mapId, lastNodeId — there is no lastNodeSequenceId.
type OutboundValidation ¶
type OutboundValidation struct {
// Disabled turns off all outbound validation.
Disabled bool
// AllowZeroHeaderID permits headerId == 0 (default false).
AllowZeroHeaderID bool
// SkipIdentityCheck skips manufacturer/serial vs AGVHandle checks (default false).
SkipIdentityCheck bool
}
OutboundValidation configures light pre-publish checks (no ID allocation). Nil Config.OutboundValidation means checks are enabled with defaults.
type PublishOptions ¶
PublishOptions controls MQTT publish behaviour.
type PublishOutcome ¶
type PublishOutcome int
PublishOutcome is the execution-layer three-way result of a publish. It answers whether the caller-supplied protocol IDs may be reused.
const ( // PublishOutcomeAccepted: broker accepted the publish (QoS handshake). // IDs are consumed; platforms may RecordSuccessfulPublish. PublishOutcomeAccepted PublishOutcome = iota // PublishOutcomeNotStarted: the publish never became a deliverable MQTT packet. // IDs may be returned to the pool and reused. PublishOutcomeNotStarted // PublishOutcomeUncertain: the packet may already be in flight (typical: PUBACK timeout). // IDs must not be reused. Fencing / recovery is orchestration. PublishOutcomeUncertain )
func ClassifyPublish ¶
func ClassifyPublish(err error) PublishOutcome
ClassifyPublish maps a publish error to Accepted / NotStarted / Uncertain. Prefer this on the orchestration path; IsPublish* predicates remain for logs.
func (PublishOutcome) String ¶
func (o PublishOutcome) String() string
type PublishResult ¶
type PublishResult struct {
Topic string
Channel topic.Channel
Manufacturer string
SerialNumber string
QoS byte
Payload []byte
HeaderID uint32
OrderID string
OrderUpdateID uint32
ActionIDs []string
}
PublishResult is a summary of what was actually handed to Transport.Publish. It is for reconciliation / logging only: navlink does not allocate IDs and does not RecordSuccessfulPublish — the orchestration layer decides that from err.
type RawHandler ¶
RawHandler handles a transport-level message (topic + payload).
type ReconnectAware ¶
type ReconnectAware interface {
SetOnReconnect(fn func())
}
ReconnectAware is implemented by transports that can signal reconnects. The handler is invoked after a successful reconnect, not on the initial connect.
type StateEvent ¶
StateEvent is the payload for EventStateReceived.
type StateHandler ¶
StateHandler handles a decoded state message. It runs on the inbound worker and must return quickly: no HTTP, no Subscribe, no long locks, no waiting for MQTT Publish. Do slow work in another goroutine.
type TopicHandler ¶
TopicHandler is the escape hatch for non-typed topic filters. Same threading rules as StateHandler. On the built-in MQTT transport, custom topics share an isolated lane (not the per-AGV state shards).
type Transport ¶
type Transport interface {
Start(ctx context.Context) error
Stop(ctx context.Context) error
Publish(ctx context.Context, topic string, payload []byte, opts PublishOptions) error
Subscribe(ctx context.Context, filter string, handler RawHandler) (Unsubscribe, error)
}
Transport is the byte-level pub/sub boundary (MQTT, memory, etc.). VDA typed APIs live on Client; raw MQTT must not be mixed into AGV helpers.
type Unsubscribe ¶
Unsubscribe cancels a subscription.
type VisualizationEvent ¶
type VisualizationEvent struct {
Envelope Envelope
Visualization *visualization.Visualization
}
VisualizationEvent is the payload for EventVisualizationReceived.
type VisualizationHandler ¶
type VisualizationHandler func(ctx context.Context, env Envelope, msg *visualization.Visualization) error
VisualizationHandler handles a decoded visualization message.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
examples
|
|
|
dispatch-egress-sketch
command
Dispatch egress sketch: GetNext → fill → Publish → Record / return / fence from ClassifyPublish.
|
Dispatch egress sketch: GetNext → fill → Publish → Record / return / fence from ClassifyPublish. |
|
platform-wiring
command
|
|
|
subscribe-state
command
|
|
|
internal
|
|
|
gerrors
Code generated by glitch.
|
Code generated by glitch. |