Documentation ¶
Overview ¶
Package fake is a fake MovementSensor for testing
Index ¶
- func NewMovementSensor(ctx context.Context, deps resource.Dependencies, conf resource.Config, ...) (movementsensor.MovementSensor, error)
- type Config
- type MovementSensor
- func (f *MovementSensor) Accuracy(ctx context.Context, extra map[string]interface{}) (*movementsensor.Accuracy, error)
- func (f *MovementSensor) AngularVelocity(ctx context.Context, extra map[string]interface{}) (spatialmath.AngularVelocity, error)
- func (f *MovementSensor) Close(ctx context.Context) error
- func (f *MovementSensor) CompassHeading(ctx context.Context, extra map[string]interface{}) (float64, error)
- func (f *MovementSensor) DoCommand(ctx context.Context, cmd map[string]interface{}) (map[string]interface{}, error)
- func (f *MovementSensor) LinearAcceleration(ctx context.Context, extra map[string]interface{}) (r3.Vector, error)
- func (f *MovementSensor) LinearVelocity(ctx context.Context, extra map[string]interface{}) (r3.Vector, error)
- func (f *MovementSensor) Orientation(ctx context.Context, extra map[string]interface{}) (spatialmath.Orientation, error)
- func (f *MovementSensor) Position(ctx context.Context, extra map[string]interface{}) (*geo.Point, float64, error)
- func (f *MovementSensor) Properties(ctx context.Context, extra map[string]interface{}) (*movementsensor.Properties, error)
- func (f *MovementSensor) Readings(ctx context.Context, extra map[string]interface{}) (map[string]interface{}, error)
- func (f *MovementSensor) Start(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMovementSensor ¶ added in v0.9.0
func NewMovementSensor(ctx context.Context, deps resource.Dependencies, conf resource.Config, logger logging.Logger, ) (movementsensor.MovementSensor, error)
NewMovementSensor makes a new fake movement sensor.
Types ¶
type Config ¶ added in v0.2.36
type Config struct {
resource.TriviallyValidateConfig
}
Config is used for converting fake movementsensor attributes.
type MovementSensor ¶
type MovementSensor struct { resource.Named resource.AlwaysRebuild // contains filtered or unexported fields }
MovementSensor implements is a fake movement sensor interface.
func (*MovementSensor) Accuracy ¶
func (f *MovementSensor) Accuracy(ctx context.Context, extra map[string]interface{}) (*movementsensor.Accuracy, error)
Accuracy gets the accuracy of a fake movementsensor.
func (*MovementSensor) AngularVelocity ¶
func (f *MovementSensor) AngularVelocity(ctx context.Context, extra map[string]interface{}) (spatialmath.AngularVelocity, error)
AngularVelocity gets the angular velocity of a fake movementsensor.
func (*MovementSensor) Close ¶
func (f *MovementSensor) Close(ctx context.Context) error
Close returns the fix of a fake gps movementsensor.
func (*MovementSensor) CompassHeading ¶
func (f *MovementSensor) CompassHeading(ctx context.Context, extra map[string]interface{}) (float64, error)
CompassHeading gets the compass headings of a fake movementsensor.
func (*MovementSensor) DoCommand ¶
func (f *MovementSensor) DoCommand(ctx context.Context, cmd map[string]interface{}) (map[string]interface{}, error)
DoCommand uses a map string to run custom functionality of a fake movementsensor.
func (*MovementSensor) LinearAcceleration ¶ added in v0.2.11
func (f *MovementSensor) LinearAcceleration(ctx context.Context, extra map[string]interface{}) (r3.Vector, error)
LinearAcceleration gets the linear acceleration of a fake movementsensor.
func (*MovementSensor) LinearVelocity ¶
func (f *MovementSensor) LinearVelocity(ctx context.Context, extra map[string]interface{}) (r3.Vector, error)
LinearVelocity gets the linear velocity of a fake movementsensor.
func (*MovementSensor) Orientation ¶
func (f *MovementSensor) Orientation(ctx context.Context, extra map[string]interface{}) (spatialmath.Orientation, error)
Orientation gets the orientation of a fake movementsensor.
func (*MovementSensor) Position ¶
func (f *MovementSensor) Position(ctx context.Context, extra map[string]interface{}) (*geo.Point, float64, error)
Position gets the position of a fake movementsensor.
func (*MovementSensor) Properties ¶
func (f *MovementSensor) Properties(ctx context.Context, extra map[string]interface{}) (*movementsensor.Properties, error)
Properties returns the properties of a fake movementsensor.