commands

package
v0.7.21 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseCommandHandler

type BaseCommandHandler struct {
}

func (BaseCommandHandler) Execute

type BaseCommandRequest

type BaseCommandRequest struct {
	Input string
}

type BaseCommandResponse

type BaseCommandResponse struct {
	Result bool
}

type CreateDBCCodeCommandHandler

type CreateDBCCodeCommandHandler struct {
	DBS func() *db.ReaderWriter
}

func NewCreateDBCCodeCommandHandler

func NewCreateDBCCodeCommandHandler(dbs func() *db.ReaderWriter) CreateDBCCodeCommandHandler

func (CreateDBCCodeCommandHandler) Execute

type CreateDBCCodeCommandRequest

type CreateDBCCodeCommandRequest struct {
	Name             string
	DBCContents      string
	Header           int
	Trigger          string
	RecordingEnabled bool
	MaxSampleSize    int32
}

type CreateDBCCodeCommandResponse

type CreateDBCCodeCommandResponse struct {
	ID   string
	Name string
}

type CreateDbcCommandHandler added in v0.4.4

type CreateDbcCommandHandler struct {
	DBS func() *db.ReaderWriter
}

func NewCreateDbcCommandHandler added in v0.4.4

func NewCreateDbcCommandHandler(dbs func() *db.ReaderWriter) CreateDbcCommandHandler

func (CreateDbcCommandHandler) Execute added in v0.4.4

type CreateDbcCommandRequest added in v0.4.4

type CreateDbcCommandRequest struct {
	TemplateName string
	DbcFile      string
}

type CreateDbcCommandResponse added in v0.4.4

type CreateDbcCommandResponse struct {
	Name string
}

type CreateDeviceSettingsCommandHandler added in v0.4.4

type CreateDeviceSettingsCommandHandler struct {
	DBS func() *db.ReaderWriter
}

func NewCreateDeviceSettingsCommandHandler added in v0.4.4

func NewCreateDeviceSettingsCommandHandler(dbs func() *db.ReaderWriter) CreateDeviceSettingsCommandHandler

func (CreateDeviceSettingsCommandHandler) Execute added in v0.4.4

type CreateDeviceSettingsCommandRequest added in v0.4.4

type CreateDeviceSettingsCommandRequest struct {
	Name     string
	Settings SettingsData `json:"settings"`
}

type CreateDeviceSettingsCommandResponse added in v0.4.4

type CreateDeviceSettingsCommandResponse struct {
	Name string
}

type CreateJobByEtherumAddressCommandHandler added in v0.6.2

type CreateJobByEtherumAddressCommandHandler struct {
	DBS func() *db.ReaderWriter
}

func NewCreateJobByEtherumAddressCommandHandler added in v0.6.2

func NewCreateJobByEtherumAddressCommandHandler(dbs func() *db.ReaderWriter) CreateJobByEtherumAddressCommandHandler

func (CreateJobByEtherumAddressCommandHandler) Execute added in v0.6.2

type CreateJobCommandRequest added in v0.6.2

type CreateJobCommandRequest struct {
	Command        string
	EtherumAddress string
}

type CreatePidCommandHandler added in v0.4.4

type CreatePidCommandHandler struct {
	DBS func() *db.ReaderWriter
}

func NewCreatePidCommandHandler added in v0.4.4

func NewCreatePidCommandHandler(dbs func() *db.ReaderWriter) CreatePidCommandHandler

func (CreatePidCommandHandler) Execute added in v0.4.4

type CreatePidCommandRequest added in v0.4.4

type CreatePidCommandRequest struct {
	ID              int64
	TemplateName    string
	Header          []byte
	Mode            []byte
	Pid             []byte
	Formula         string
	IntervalSeconds int32
	Protocol        string
	SignalName      string
	BytesReturned   int32
}

type CreatePidCommandResponse added in v0.4.4

type CreatePidCommandResponse struct {
	ID int64
}

type CreateTemplateCommandHandler added in v0.4.4

type CreateTemplateCommandHandler struct {
	DBS func() *db.ReaderWriter
}

func NewCreateTemplateCommandHandler added in v0.4.4

func NewCreateTemplateCommandHandler(dbs func() *db.ReaderWriter) CreateTemplateCommandHandler

func (CreateTemplateCommandHandler) Execute added in v0.4.4

type CreateTemplateCommandRequest added in v0.4.4

type CreateTemplateCommandRequest struct {
	Name               string
	ParentTemplateName string
	Version            string
	Protocol           string
	Powertrain         string
	DBC                string
	TemplateVehicles   []string
}

type CreateTemplateCommandResponse added in v0.4.4

type CreateTemplateCommandResponse struct {
	Name string
}

type CreateTestSignalCommandHandler

type CreateTestSignalCommandHandler struct {
	DBS func() *db.ReaderWriter
}

func NewCreateTestSignalCommandHandler

func NewCreateTestSignalCommandHandler(dbs func() *db.ReaderWriter) CreateTestSignalCommandHandler

func (CreateTestSignalCommandHandler) Execute

type CreateTestSignalCommandRequest

type CreateTestSignalCommandRequest struct {
	DeviceDefinitionID string
	DBCCodesID         string
	UserDeviceID       string
	AutoPIUnitID       string
	Value              string
	Approved           bool
}

type CreateTestSignalCommandResponse

type CreateTestSignalCommandResponse struct {
	ID string
}

type DeleteJobByEtherumAddressCommandHandler added in v0.6.2

type DeleteJobByEtherumAddressCommandHandler struct {
	DBS func() *db.ReaderWriter
}

func NewDeleteJobByEtherumAddressCommandHandler added in v0.6.2

func NewDeleteJobByEtherumAddressCommandHandler(dbs func() *db.ReaderWriter) DeleteJobByEtherumAddressCommandHandler

func (DeleteJobByEtherumAddressCommandHandler) Execute added in v0.6.2

type DeleteJobCommandRequest added in v0.6.2

type DeleteJobCommandRequest struct {
	ID string
}

type DeleteJobCommandResponse added in v0.6.2

type DeleteJobCommandResponse struct {
	Status bool
}

type DeletePidCommandHandler added in v0.4.8

type DeletePidCommandHandler struct {
	DBS func() *db.ReaderWriter
}

func NewDeletePidCommandHandler added in v0.4.8

func NewDeletePidCommandHandler(dbs func() *db.ReaderWriter) DeletePidCommandHandler

func (DeletePidCommandHandler) Execute added in v0.4.8

type DeletePidCommandRequest added in v0.4.8

type DeletePidCommandRequest struct {
	ID           int64
	TemplateName string
}

type RunTestSignalCommandHandler

type RunTestSignalCommandHandler interface {
	Execute(ctx context.Context, command *RunTestSignalCommandRequest) error
}

func NewRunTestSignalCommandHandler

func NewRunTestSignalCommandHandler(dbs func() *db.ReaderWriter, logger zerolog.Logger, userDeviceService services.UserDeviceService) RunTestSignalCommandHandler

type RunTestSignalCommandRequest

type RunTestSignalCommandRequest struct {
	AutoPIUnitID string
	Time         time.Time
	Signals      map[string]RunTestSignalItemCommandRequest
}

type RunTestSignalCommandResponse

type RunTestSignalCommandResponse struct {
}

type RunTestSignalItemCommandRequest added in v0.1.4

type RunTestSignalItemCommandRequest struct {
	Value any    `json:"value"`
	Time  string `json:"_stamp"`
}

type SettingsData added in v0.6.4

type SettingsData struct {
	SafetyCutOutVoltage             float64 `json:"safety_cut_out_voltage"`
	SleepTimerEventDrivenPeriodSecs float64 `json:"sleep_timer_event_driven_period_secs"`
	WakeTriggerVoltageLevel         float64 `json:"wake_trigger_voltage_level"`
}

type UpdateDBCCodeCommandHandler

type UpdateDBCCodeCommandHandler struct {
	DBS func() *db.ReaderWriter
}

func NewUpdateDBCCodeCommandHandler

func NewUpdateDBCCodeCommandHandler(dbs func() *db.ReaderWriter) UpdateDBCCodeCommandHandler

func (UpdateDBCCodeCommandHandler) Execute

type UpdateDBCCodeCommandRequest

type UpdateDBCCodeCommandRequest struct {
	ID               string
	Name             string
	DBCContents      string
	Header           int
	Trigger          string
	RecordingEnabled bool
	MaxSampleSize    int32
}

type UpdateDBCCodeCommandResponse

type UpdateDBCCodeCommandResponse struct {
	ID   string
	Name string
}

type UpdateDbcCommandHandler added in v0.4.4

type UpdateDbcCommandHandler struct {
	DBS func() *db.ReaderWriter
}

func NewUpdateDbcCommandHandler added in v0.4.4

func NewUpdateDbcCommandHandler(dbs func() *db.ReaderWriter) UpdateDbcCommandHandler

func (UpdateDbcCommandHandler) Execute added in v0.4.4

type UpdateDbcCommandRequest added in v0.4.4

type UpdateDbcCommandRequest struct {
	TemplateName string
	DbcFile      string
}

type UpdateDbcCommandResponse added in v0.4.4

type UpdateDbcCommandResponse struct {
	TemplateName string
}

type UpdateDeviceSettingsCommandHandler added in v0.4.4

type UpdateDeviceSettingsCommandHandler struct {
	DBS func() *db.ReaderWriter
}

func NewUpdateDeviceSettingsCommandHandler added in v0.4.4

func NewUpdateDeviceSettingsCommandHandler(dbs func() *db.ReaderWriter) UpdateDeviceSettingsCommandHandler

func (UpdateDeviceSettingsCommandHandler) Execute added in v0.4.4

type UpdateDeviceSettingsCommandRequest added in v0.4.4

type UpdateDeviceSettingsCommandRequest struct {
	Name     string
	Settings SettingsData `json:"settings"`
}

type UpdateDeviceSettingsCommandResponse added in v0.4.4

type UpdateDeviceSettingsCommandResponse struct {
	Name string
}

type UpdateJobStatusByEtherumAddressCommandHandler added in v0.6.2

type UpdateJobStatusByEtherumAddressCommandHandler struct {
	DBS func() *db.ReaderWriter
}

func NewUpdateJobStatusByEtherumAddressCommandHandler added in v0.6.2

func NewUpdateJobStatusByEtherumAddressCommandHandler(dbs func() *db.ReaderWriter) UpdateJobStatusByEtherumAddressCommandHandler

func (UpdateJobStatusByEtherumAddressCommandHandler) Execute added in v0.6.2

type UpdateJobStatusCommandRequest added in v0.6.2

type UpdateJobStatusCommandRequest struct {
	ID     string
	Status string
}

type UpdateJobStatusCommandResponse added in v0.6.2

type UpdateJobStatusCommandResponse struct {
	Status bool
}

type UpdatePidCommandHandler added in v0.4.4

type UpdatePidCommandHandler struct {
	DBS func() *db.ReaderWriter
}

func NewUpdatePidCommandHandler added in v0.4.4

func NewUpdatePidCommandHandler(dbs func() *db.ReaderWriter) UpdatePidCommandHandler

func (UpdatePidCommandHandler) Execute added in v0.4.4

type UpdatePidCommandRequest added in v0.4.4

type UpdatePidCommandRequest struct {
	ID              int64
	TemplateName    string
	Header          []byte
	Mode            []byte
	Pid             []byte
	Formula         string
	IntervalSeconds int32
	Protocol        string
	SignalName      string
	BytesReturned   int32
}

type UpdatePidCommandResponse added in v0.4.4

type UpdatePidCommandResponse struct {
	ID int64
}

type UpdateTemplateCommandHandler added in v0.4.4

type UpdateTemplateCommandHandler struct {
	DBS func() *db.ReaderWriter
}

func NewUpdateTemplateCommandHandler added in v0.4.4

func NewUpdateTemplateCommandHandler(dbs func() *db.ReaderWriter) UpdateTemplateCommandHandler

func (UpdateTemplateCommandHandler) Execute added in v0.4.4

type UpdateTemplateCommandRequest added in v0.4.4

type UpdateTemplateCommandRequest struct {
	Name               string
	ParentTemplateName string
	Version            string
	Protocol           string
	Powertrain         string
	DBC                string
	TemplateVehicles   []string
}

type UpdateTemplateCommandResponse added in v0.4.4

type UpdateTemplateCommandResponse struct {
	Name string
}

type UpdateTestSignalCommandHandler

type UpdateTestSignalCommandHandler struct {
	DBS func() *db.ReaderWriter
}

func NewUpdateTestSignalCommandHandler

func NewUpdateTestSignalCommandHandler(dbs func() *db.ReaderWriter) UpdateTestSignalCommandHandler

func (UpdateTestSignalCommandHandler) Execute

type UpdateTestSignalCommandRequest

type UpdateTestSignalCommandRequest struct {
	ID                 string
	DeviceDefinitionID string
	DBCCodesID         string
	UserDeviceID       string
	AutoPIUnitID       string
	Value              string
	Approved           bool
}

type UpdateTestSignalCommandResponse

type UpdateTestSignalCommandResponse struct {
	ID string
}

Directories

Path Synopsis
Code generated by MockGen.
Code generated by MockGen.

Jump to

Keyboard shortcuts

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