Class: AWSCDK::IoTFleetWise::CfnDecoderManifest::CanSignalProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
io_t_fleet_wise/cfn_decoder_manifest.rb

Overview

Information about a single controller area network (CAN) signal and the messages it receives and transmits.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(factor:, is_big_endian:, is_signed:, length:, message_id:, offset:, start_bit:, name: nil, signal_value_type: nil) ⇒ CanSignalProperty

Returns a new instance of CanSignalProperty.

Parameters:

  • factor (String)

    A multiplier used to decode the CAN message.

  • is_big_endian (String)

    Whether the byte ordering of a CAN message is big-endian.

  • is_signed (String)

    Whether the message data is specified as a signed value.

  • length (String)

    How many bytes of data are in the message.

  • message_id (String)

    The ID of the message.

  • offset (String)

    The offset used to calculate the signal value.

  • start_bit (String)

    Indicates the beginning of the CAN message.

  • name (String, nil) (defaults to: nil)

    The name of the signal.

  • signal_value_type (String, nil) (defaults to: nil)

    The value type of the signal.



818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
# File 'io_t_fleet_wise/cfn_decoder_manifest.rb', line 818

def initialize(factor:, is_big_endian:, is_signed:, length:, message_id:, offset:, start_bit:, name: nil, signal_value_type: nil)
  @factor = factor
  Jsii::Type.check_type(@factor, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "factor")
  @is_big_endian = is_big_endian
  Jsii::Type.check_type(@is_big_endian, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "isBigEndian")
  @is_signed = is_signed
  Jsii::Type.check_type(@is_signed, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "isSigned")
  @length = length
  Jsii::Type.check_type(@length, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "length")
  @message_id = message_id
  Jsii::Type.check_type(@message_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "messageId")
  @offset = offset
  Jsii::Type.check_type(@offset, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "offset")
  @start_bit = start_bit
  Jsii::Type.check_type(@start_bit, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "startBit")
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") unless @name.nil?
  @signal_value_type = signal_value_type
  Jsii::Type.check_type(@signal_value_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "signalValueType") unless @signal_value_type.nil?
end

Instance Attribute Details

#factorString (readonly)

A multiplier used to decode the CAN message.



843
844
845
# File 'io_t_fleet_wise/cfn_decoder_manifest.rb', line 843

def factor
  @factor
end

#is_big_endianString (readonly)

Whether the byte ordering of a CAN message is big-endian.



848
849
850
# File 'io_t_fleet_wise/cfn_decoder_manifest.rb', line 848

def is_big_endian
  @is_big_endian
end

#is_signedString (readonly)

Whether the message data is specified as a signed value.



853
854
855
# File 'io_t_fleet_wise/cfn_decoder_manifest.rb', line 853

def is_signed
  @is_signed
end

#lengthString (readonly)

How many bytes of data are in the message.



858
859
860
# File 'io_t_fleet_wise/cfn_decoder_manifest.rb', line 858

def length
  @length
end

#message_idString (readonly)

The ID of the message.



863
864
865
# File 'io_t_fleet_wise/cfn_decoder_manifest.rb', line 863

def message_id
  @message_id
end

#nameString? (readonly)

The name of the signal.



880
881
882
# File 'io_t_fleet_wise/cfn_decoder_manifest.rb', line 880

def name
  @name
end

#offsetString (readonly)

The offset used to calculate the signal value.

Combined with factor, the calculation is value = raw_value * factor + offset .



870
871
872
# File 'io_t_fleet_wise/cfn_decoder_manifest.rb', line 870

def offset
  @offset
end

#signal_value_typeString? (readonly)

The value type of the signal.

The default value is INTEGER .



887
888
889
# File 'io_t_fleet_wise/cfn_decoder_manifest.rb', line 887

def signal_value_type
  @signal_value_type
end

#start_bitString (readonly)

Indicates the beginning of the CAN message.



875
876
877
# File 'io_t_fleet_wise/cfn_decoder_manifest.rb', line 875

def start_bit
  @start_bit
end

Class Method Details

.jsii_propertiesObject



889
890
891
892
893
894
895
896
897
898
899
900
901
# File 'io_t_fleet_wise/cfn_decoder_manifest.rb', line 889

def self.jsii_properties
  {
    :factor => "factor",
    :is_big_endian => "isBigEndian",
    :is_signed => "isSigned",
    :length => "length",
    :message_id => "messageId",
    :offset => "offset",
    :start_bit => "startBit",
    :name => "name",
    :signal_value_type => "signalValueType",
  }
end

Instance Method Details

#to_jsiiObject



903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
# File 'io_t_fleet_wise/cfn_decoder_manifest.rb', line 903

def to_jsii
  result = {}
  result.merge!({
    "factor" => @factor,
    "isBigEndian" => @is_big_endian,
    "isSigned" => @is_signed,
    "length" => @length,
    "messageId" => @message_id,
    "offset" => @offset,
    "startBit" => @start_bit,
    "name" => @name,
    "signalValueType" => @signal_value_type,
  })
  result.compact
end