// Code generated by go-swagger; DO NOT EDIT.

package models

// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

import (
	"context"

	"github.com/go-openapi/strfmt"
	"github.com/go-openapi/swag"
)

// CommonSignalDescWithECU common signal desc with e c u
//
// swagger:model common.SignalDescWithECU
type CommonSignalDescWithECU struct {

	// IsBigEndian is true if the signal is big-endian.
	BigEndian bool `json:"big_endian,omitempty"`

	// dbc hash
	DbcHash string `json:"dbc_hash,omitempty"`

	// DefaultValue of the signal.
	DefaultValue int64 `json:"default_value,omitempty"`

	// Description of the signal.
	Description string `json:"description,omitempty"`

	// ecu name
	EcuName string `json:"ecu_name,omitempty"`

	// ECUName is a name of an ECU.
	Ecuname string `json:"ecuname,omitempty"`

	// Length in bits.
	Length int64 `json:"length,omitempty"`

	// Max real-world value.
	Max float64 `json:"max,omitempty"`

	// message id
	MessageID int64 `json:"message_id,omitempty"`

	// Min real-world value.
	Min float64 `json:"min,omitempty"`

	// IsMultiplexed is true if the signal is multiplexed.
	Multiplexed bool `json:"multiplexed,omitempty"`

	// IsMultiplexer is true if the signal is the multiplexor of a multiplexed message.
	Multiplexer bool `json:"multiplexer,omitempty"`

	// MultiplexerValue is the value of the multiplexer when this signal is present.
	MultiplexerValue int64 `json:"multiplexer_value,omitempty"`

	// Description of the signal.
	Name string `json:"name,omitempty"`

	// Offset for real-world transform.
	Offset float64 `json:"offset,omitempty"`

	// ReceiverNodes is the list of names of the nodes receiving the signal.
	ReceiverNodes []string `json:"receiver_nodes"`

	// Scale for real-world transform.
	Scale float64 `json:"scale,omitempty"`

	// IsSigned is true if the signal uses raw signed values.
	Signed bool `json:"signed,omitempty"`

	// Start bit.
	Start int64 `json:"start,omitempty"`

	// Unit of the signal.
	Unit string `json:"unit,omitempty"`

	// ValueDescriptions of the signal.
	ValueDescriptions []string `json:"value_descriptions"`
}

// Validate validates this common signal desc with e c u
func (m *CommonSignalDescWithECU) Validate(formats strfmt.Registry) error {
	return nil
}

// ContextValidate validates this common signal desc with e c u based on context it is used
func (m *CommonSignalDescWithECU) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}

// MarshalBinary interface implementation
func (m *CommonSignalDescWithECU) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}

// UnmarshalBinary interface implementation
func (m *CommonSignalDescWithECU) UnmarshalBinary(b []byte) error {
	var res CommonSignalDescWithECU
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*m = res
	return nil
}
