apimaster

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2023 License: MIT Imports: 3 Imported by: 1

Documentation

Overview

Package apimaster implements the Master API.

https://wiki.ros.org/ROS/Master_API

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is a Master API client.

func NewClient

func NewClient(address string, callerID string, httpClient *http.Client) *Client

NewClient allocates a Client.

func (*Client) GetPublishedTopics

func (c *Client) GetPublishedTopics(subgraph string) ([][]string, error)

GetPublishedTopics writes a getPublishedTopics request.

func (*Client) GetSystemState

func (c *Client) GetSystemState() (*SystemState, error)

GetSystemState writes a getSystemState request.

func (*Client) GetTopicTypes

func (c *Client) GetTopicTypes() ([]TopicType, error)

GetTopicTypes writes a getTopicTypes request.

func (*Client) GetURI

func (c *Client) GetURI() (string, error)

GetURI writes a getUri request.

func (*Client) LookupNode

func (c *Client) LookupNode(name string) (string, error)

LookupNode writes a lookupNode request.

func (*Client) LookupService

func (c *Client) LookupService(name string) (string, error)

LookupService writes a lookupService request.

func (*Client) RegisterPublisher

func (c *Client) RegisterPublisher(
	topic string,
	topicType string,
	callerURL string,
) ([]string, error)

RegisterPublisher writes a registerPublisher request.

func (*Client) RegisterService

func (c *Client) RegisterService(
	service string,
	serviceURL string,
	callerURL string,
) error

RegisterService writes a registerService request.

func (*Client) RegisterSubscriber

func (c *Client) RegisterSubscriber(
	topic string,
	topicType string,
	callerURL string,
) ([]string, error)

RegisterSubscriber writes a registerSubscriber request.

func (*Client) UnregisterPublisher

func (c *Client) UnregisterPublisher(topic string, callerURL string) error

UnregisterPublisher writes a unregisterPublisher request.

func (*Client) UnregisterService

func (c *Client) UnregisterService(
	service string,
	serviceURL string,
) error

UnregisterService writes a unregisterService request.

func (*Client) UnregisterSubscriber

func (c *Client) UnregisterSubscriber(topic string, callerURL string) error

UnregisterSubscriber writes a unregisterSubscriber request.

type RequestGetPublishedTopics

type RequestGetPublishedTopics struct {
	CallerID string
	Subgraph string
}

RequestGetPublishedTopics is a getPublishedTopics request.

type RequestGetSystemState

type RequestGetSystemState struct {
	CallerID string
}

RequestGetSystemState is a getSystemState request.

type RequestGetTopicTypes

type RequestGetTopicTypes struct {
	CallerID string
}

RequestGetTopicTypes is a getTopicTypes request.

type RequestGetURI

type RequestGetURI struct {
	CallerID string
}

RequestGetURI is a getUri request.

type RequestLookup

type RequestLookup struct {
	CallerID string
	Name     string
}

RequestLookup is a lookup* request.

type RequestRegister

type RequestRegister struct {
	CallerID  string
	Topic     string
	TopicType string
	CallerURL string
}

RequestRegister is a register* request.

type RequestRegisterService

type RequestRegisterService struct {
	CallerID   string
	Service    string
	ServiceURL string
	CallerURL  string
}

RequestRegisterService is a registerService request.

type RequestUnregister

type RequestUnregister struct {
	CallerID  string
	Topic     string
	CallerURL string
}

RequestUnregister is an unregister* request.

type RequestUnregisterService

type RequestUnregisterService struct {
	CallerID   string
	Service    string
	ServiceURL string
}

RequestUnregisterService is a unregisterService request.

type ResponseGetPublishedTopics

type ResponseGetPublishedTopics struct {
	Code          int
	StatusMessage string
	Topics        [][]string
}

ResponseGetPublishedTopics is the response to a getPublishedTopics request.

type ResponseGetSystemState

type ResponseGetSystemState struct {
	Code          int
	StatusMessage string
	State         SystemState
}

ResponseGetSystemState is the response to a getSystemState request.

type ResponseGetTopicTypes

type ResponseGetTopicTypes struct {
	Code          int
	StatusMessage string
	Types         []TopicType
}

ResponseGetTopicTypes is the response to a getTopicTypes request.

type ResponseGetURI

type ResponseGetURI struct {
	Code          int
	StatusMessage string
	MasterURI     string
}

ResponseGetURI is the response to a getUri request.

type ResponseLookup

type ResponseLookup struct {
	Code          int
	StatusMessage string
	URL           string
}

ResponseLookup is the response to a lookup* request.

type ResponseRegister

type ResponseRegister struct {
	Code          int
	StatusMessage string
	URIs          []string
}

ResponseRegister is the response to a register* request.

type ResponseRegisterService

type ResponseRegisterService struct {
	Code          int
	StatusMessage string
	Ignore        int
}

ResponseRegisterService is the response to a registerService request.

type ResponseServiceUnregister

type ResponseServiceUnregister struct {
	Code            int
	StatusMessage   string
	NumUnregistered int
}

ResponseServiceUnregister is the response to a unregisterService request.

type ResponseUnregister

type ResponseUnregister struct {
	Code            int
	StatusMessage   string
	NumUnregistered int
}

ResponseUnregister is the response to a unregister* request.

type SystemState

type SystemState struct {
	PublishedTopics  []SystemStateEntry
	SubscribedTopics []SystemStateEntry
	ProvidedServices []SystemStateEntry
}

SystemState is a system state.

type SystemStateEntry

type SystemStateEntry struct {
	Name  string
	Nodes []string
}

SystemStateEntry is a system state entry.

type TopicType

type TopicType struct {
	Name string
	Type string
}

TopicType is a topic type.

Jump to

Keyboard shortcuts

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