Documentation ¶
Index ¶
- Constants
- func NewTestClient(t *testing.T) *rpc.Client
- func StartTestServer()
- func StopTestServer()
- type AcquireConnectionRequest
- type AcquireConnectionResponse
- type Connection
- type ConnectionRequest
- type ConnectionResponse
- type DirectDriveRequest
- type DirectDriveResponse
- type DriveRequest
- type DriveResponse
- type GetPortsRequest
- type GetPortsResponse
- type Port
- type ReleaseConnectionRequest
- type ReleaseConnectionResponse
- type RoombaServer
- func (server RoombaServer) AcquireConnection(req *AcquireConnectionRequest, resp *AcquireConnectionResponse) error
- func (server *RoombaServer) CloseConnection(port_name string) error
- func (server RoombaServer) DirectDrive(req DirectDriveRequest, resp *DirectDriveResponse) error
- func (server RoombaServer) Drive(req DriveRequest, resp *DriveResponse) error
- func (server *RoombaServer) GetConnection(port_name string) error
- func (server RoombaServer) GetPorts(req *GetPortsRequest, resp *GetPortsResponse) error
- func (server RoombaServer) ReleaseConnection(req *ReleaseConnectionRequest, resp *ReleaseConnectionResponse) error
- func (server RoombaServer) Sensor(req SensorRequest, resp *SensorResponse) error
- func (server RoombaServer) SensorList(req *SensorListRequest, resp *SensorListResponse) error
- type SensorListRequest
- type SensorListResponse
- type SensorRequest
- type SensorResponse
Constants ¶
View Source
const ( OPEN operation = iota CLOSE operation = iota )
View Source
const DUMMY_PORT_NAME string = "DummyPort"
Variables ¶
This section is empty.
Functions ¶
func StartTestServer ¶
func StartTestServer()
func StopTestServer ¶
func StopTestServer()
Types ¶
type AcquireConnectionRequest ¶
type AcquireConnectionRequest struct {
Port string `json:"port_name"`
}
type AcquireConnectionResponse ¶
type AcquireConnectionResponse struct {
Port string `json:"port_name"`
}
type Connection ¶
type ConnectionRequest ¶
type ConnectionRequest struct { Port string Operation operation C chan<- ConnectionResponse }
type ConnectionResponse ¶
type ConnectionResponse struct {
Error error
}
type DirectDriveRequest ¶
type DirectDriveResponse ¶
type DirectDriveResponse struct{}
type DriveRequest ¶
type DriveResponse ¶
type DriveResponse struct{}
type GetPortsRequest ¶
type GetPortsRequest struct{}
type GetPortsResponse ¶
type GetPortsResponse struct {
Ports []Port `json:"ports"`
}
type ReleaseConnectionRequest ¶
type ReleaseConnectionRequest struct {
Port string `json:"port_name"`
}
type ReleaseConnectionResponse ¶
type ReleaseConnectionResponse struct{}
type RoombaServer ¶
type RoombaServer struct { Connections map[string]Connection // contains filtered or unexported fields }
func MakeServer ¶
func MakeServer() (s RoombaServer)
func (RoombaServer) AcquireConnection ¶
func (server RoombaServer) AcquireConnection(req *AcquireConnectionRequest, resp *AcquireConnectionResponse) error
func (*RoombaServer) CloseConnection ¶
func (server *RoombaServer) CloseConnection(port_name string) error
func (RoombaServer) DirectDrive ¶
func (server RoombaServer) DirectDrive(req DirectDriveRequest, resp *DirectDriveResponse) error
func (RoombaServer) Drive ¶
func (server RoombaServer) Drive(req DriveRequest, resp *DriveResponse) error
func (*RoombaServer) GetConnection ¶
func (server *RoombaServer) GetConnection(port_name string) error
func (RoombaServer) GetPorts ¶
func (server RoombaServer) GetPorts(req *GetPortsRequest, resp *GetPortsResponse) error
func (RoombaServer) ReleaseConnection ¶
func (server RoombaServer) ReleaseConnection(req *ReleaseConnectionRequest, resp *ReleaseConnectionResponse) error
func (RoombaServer) Sensor ¶
func (server RoombaServer) Sensor(req SensorRequest, resp *SensorResponse) error
func (RoombaServer) SensorList ¶
func (server RoombaServer) SensorList(req *SensorListRequest, resp *SensorListResponse) error
type SensorListRequest ¶
type SensorListResponse ¶
type SensorListResponse struct {
Values [][]byte `json:"values"`
}
type SensorRequest ¶
type SensorResponse ¶
type SensorResponse struct {
Value []byte `json:"value"`
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.