package transformer

import "github.com/edgexfoundry/device-sdk-go/internal/transformer"

Index

Constants

const (
	Overflow = "overflow"
	NaN      = "NaN"
)

Functions

func CheckAssertion

func CheckAssertion(
	cv *dsModels.CommandValue,
	assertion string,
	device *contract.Device,
	lc logger.LoggingClient,
	dc metadata.DeviceClient) error

func MapCommandValue

func MapCommandValue(value *dsModels.CommandValue, mappings map[string]string) (*dsModels.CommandValue, bool)

func TransformReadResult

func TransformReadResult(cv *dsModels.CommandValue, pv contract.PropertyValue, lc logger.LoggingClient) error

func TransformWriteParameter

func TransformWriteParameter(cv *dsModels.CommandValue, pv contract.PropertyValue, lc logger.LoggingClient) error

Types

type NaNError

type NaNError struct{}

NaNError is used to throw the NaN error for the floating-point value

func (NaNError) Error

func (e NaNError) Error() string

type OverflowError

type OverflowError struct {
	// contains filtered or unexported fields
}

OverflowError is used to throw the error of transformed value is out of range

func NewOverflowError

func NewOverflowError(origin interface{}, transformed float64) OverflowError

func (OverflowError) Error

func (e OverflowError) Error() string

func (OverflowError) String

func (e OverflowError) String() string

Source Files

checkNaN.go overflowerror.go transformparam.go transformresult.go transformvaluechecker.go

Version
v1.4.0 (latest)
Published
Dec 21, 2020
Platform
linux/amd64
Imports
14 packages
Last checked
4 days ago

Tools for package owners.