Documentation
¶
Overview ¶
Package config implements functions to assist with attribute evaluation in the SLAM service
Index ¶
- func DetermineDeleteProcessedData(logger golog.Logger, deleteData *bool, useLiveData bool) bool
- func DetermineUseLiveData(logger golog.Logger, liveData *bool, sensors []string) (bool, error)
- func GetOptionalParameters(config *AttrConfig, defaultPort string, ...) (string, int, int, bool, bool, error)
- func SetupDirectories(dataDirectory string, logger golog.Logger) error
- func SetupGRPCConnection(ctx context.Context, port string, dialMaxTimeoutSec int, logger golog.Logger) (pb.SLAMServiceClient, func() error, error)
- type AttrConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DetermineDeleteProcessedData ¶
DetermineDeleteProcessedData will determine the value of the deleteProcessData attribute based on the useLiveData and deleteData input parameters.
func DetermineUseLiveData ¶
DetermineUseLiveData will determine the value of the useLiveData attribute based on the liveData input parameter and sensor list.
func GetOptionalParameters ¶
func GetOptionalParameters(config *AttrConfig, defaultPort string, defaultDataRateMsec, defaultMapRateSec int, logger golog.Logger, ) (string, int, int, bool, bool, error)
GetOptionalParameters sets any unset optional config parameters to the values passed to this function, and returns them.
func SetupDirectories ¶
SetupDirectories creates the data directory at the specified path along with its data, map, and config subdirectories.
Types ¶
type AttrConfig ¶
type AttrConfig struct { Sensors []string `json:"sensors"` ConfigParams map[string]string `json:"config_params"` DataDirectory string `json:"data_dir"` UseLiveData *bool `json:"use_live_data"` DataRateMsec int `json:"data_rate_msec"` MapRateSec *int `json:"map_rate_sec"` Port string `json:"port"` DeleteProcessedData *bool `json:"delete_processed_data"` Dev bool `json:"dev"` }
AttrConfig describes how to configure the SLAM service.
func NewAttrConfig ¶
func NewAttrConfig(cfg config.Service) (*AttrConfig, error)
NewAttrConfig creates a SLAM config from a service config.