Documentation
¶
Overview ¶
----------------------------------------------------------------------------- Copyright (c) 2024-2025 Sven C. Zeisberg, Zeisberg GmbH, Germany. All rights reserved. Description: -----------------------------------------------------------------------------
----------------------------------------------------------------------------- Copyright (c) 2024-2025 Sven C. Zeisberg, Zeisberg GmbH, Germany. All rights reserved. Description: camerafocus.go provides a REST API for the camera focus control. -----------------------------------------------------------------------------
----------------------------------------------------------------------------- Copyright (c) 2024-2025 Sven C. Zeisberg, Zeisberg GmbH, Germany. All rights reserved. Description: -----------------------------------------------------------------------------
----------------------------------------------------------------------------- Copyright (c) 2024-2025 Sven C. Zeisberg, Zeisberg GmbH, Germany. All rights reserved. Description: fixled.go provides the REST API endpoint to control the fix LED on the Merlin board. -----------------------------------------------------------------------------
----------------------------------------------------------------------------- Copyright (c) 2024-2025 Sven C. Zeisberg, Zeisberg GmbH, Germany. All rights reserved. Description: irleds.go provides the REST API endpoint to control the IR LEDs on the Merlin board. -----------------------------------------------------------------------------
----------------------------------------------------------------------------- Copyright (c) 2024-2025 Sven C. Zeisberg, Zeisberg GmbH, Germany. All rights reserved. Description: laser.go provides the REST API endpoint to control the laser on the Merlin board. -----------------------------------------------------------------------------
----------------------------------------------------------------------------- Copyright (c) 2024-2025 Sven C. Zeisberg, Zeisberg GmbH, Germany. All rights reserved. Description: This package provides a REST API for the Merlin board. The REST API is implemented using the standard library. The REST API provides the following endpoints: -----------------------------------------------------------------------------
Index ¶
- type CameraExposure
- type CameraFocus
- type CameraGain
- type LEDFuncStruct
- type LaserFuncStruct
- type RestAPI
- func (api *RestAPI) AddEndpoints()
- func (api *RestAPI) GET_cameraexposure(c *fiber.Ctx) error
- func (api *RestAPI) GET_camerafocus(c *fiber.Ctx) error
- func (api *RestAPI) GET_cameragain(c *fiber.Ctx) error
- func (api *RestAPI) GET_fixled(c *fiber.Ctx) error
- func (api *RestAPI) GET_irleds(c *fiber.Ctx) error
- func (api *RestAPI) GET_laser(c *fiber.Ctx) error
- func (api *RestAPI) PUT_cameraexposure(c *fiber.Ctx) error
- func (api *RestAPI) PUT_camerafocus(c *fiber.Ctx) error
- func (api *RestAPI) PUT_cameragain(c *fiber.Ctx) error
- func (api *RestAPI) PUT_fixled(c *fiber.Ctx) error
- func (api *RestAPI) PUT_irleds(c *fiber.Ctx) error
- func (api *RestAPI) PUT_laser(c *fiber.Ctx) error
- func (api *RestAPI) Start()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CameraExposure ¶
CameraExposure is a struct to exchange the exposure of the cameras.
type CameraFocus ¶
CameraFocus is a struct to exchange the focus of the cameras.
type CameraGain ¶
CameraFocus is a struct to exchange the focus of the cameras.
type LEDFuncStruct ¶
type LEDFuncStruct struct {
Right bool `json:"right"` // Right is the state of the right fix LED.
Left bool `json:"left"` // Left is the state of the left fix LED.
}
LEDFuncStruct is a struct to control the fix LED on the Merlin board.
type LaserFuncStruct ¶
type LaserFuncStruct struct {
Laser bool `json:"laser"`
}
type RestAPI ¶
type RestAPI struct {
// contains filtered or unexported fields
}
func NewRestAPI ¶
NewRestAPI creates a new RestAPI object
func (*RestAPI) AddEndpoints ¶
func (api *RestAPI) AddEndpoints()
func (*RestAPI) GET_cameraexposure ¶
GET_cameraexposure returns the exposure of the cameras as JSON object. The JSON object has the following structure:
{
"right": <gain value>,
"left": <gain value>
}
The exposure value is the current exposure of the cameras.
func (*RestAPI) GET_camerafocus ¶
GET_camerafocus is a handler function to get the focus of the cameras.
func (*RestAPI) GET_cameragain ¶
GetGain returns the gain of the cameras as JSON object. The gain is the current gain of the cameras as reported by v4l2. The JSON object has the following structure:
{
"right": <gain value>,
"left": <gain value>
}
func (*RestAPI) GET_fixled ¶
GET_fixled returns the status of the Fixation LEDs as JSON object. The JSON object has the following structure:
{
"right": <status>,
"left": <status>
}
The status is the current status of the Fixation LEDs.
func (*RestAPI) GET_irleds ¶
GET_irleds returns the status of the IR LEDs as JSON object. The JSON object has the following structure:
{
"right": <status>,
"left": <status>
}
The status is the current status of the IR LEDs.
func (*RestAPI) GET_laser ¶
GET_laser returns the status of the Laser as JSON object. The JSON object has the following structure:
{
"laser": <status>
}
The status is the current status of the Laser.
func (*RestAPI) PUT_cameraexposure ¶
PUT_cameraexposure sets the exposure in the cameras if streaming is on
func (*RestAPI) PUT_camerafocus ¶
PUT_camerafocus is a handler function to set the focus of the cameras.
func (*RestAPI) PUT_cameragain ¶
SetCamGain sets the gain in the cameras if streaming is on
func (*RestAPI) PUT_fixled ¶
PUT_fixled sets the status of the Fixation LEDs.
func (*RestAPI) PUT_irleds ¶
PUT_irleds sets the status of the IR LEDs.