cat

package module
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2025 License: MIT Imports: 15 Imported by: 0

README

Station Manager: CAT package

Documentation

Index

Constants

View Source
const (
	ServiceName = types.CatServiceName
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	ConfigService *config.Service  `di.inject:"configservice"`
	LoggerService *logging.Service `di.inject:"loggingservice"`
	// contains filtered or unexported fields
}

func (*Service) EnqueueCommand

func (s *Service) EnqueueCommand(cmdName cmds.CatCmdName, params ...string) error

EnqueueCommand queues a command with the given name and parameters for execution, ensuring the service is initialized and started. Returns an error if the service is not ready, the command lookup fails, or the sendChannel is full or closed.

func (*Service) Initialize

func (s *Service) Initialize() error

Initialize ensures the service is properly set up by initializing required components and loading configurations. It is safe to call multiple times. The IOCDI container will ensure this method is called.

func (*Service) RigConfig added in v0.0.3

func (s *Service) RigConfig() types.RigConfig

RigConfig returns the rig configuration for the service, or an empty configuration if the service is not initialized. This provides a copy of the current rig configuration, for other consumers, e.g., frontend facades.

func (*Service) Start

func (s *Service) Start() error

Start initializes and starts the service if it has been properly configured and is not yet running.

func (*Service) StatusChannel

func (s *Service) StatusChannel() (<-chan types.CatStatus, error)

StatusChannel returns a channel for monitoring cat status changes or an error if the service is uninitialized or closed.

func (*Service) Stop

func (s *Service) Stop() error

Stop safely stops the service by shutting down active processes, releasing resources, and closing the serial port.

Jump to

Keyboard shortcuts

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