Class: AWSCDK::IoTFleetWise::CfnDecoderManifest::ObdSignalProperty

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

Overview

Information about signal messages using the on-board diagnostics (OBD) II protocol in a vehicle.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(byte_length:, offset:, pid:, pid_response_length:, scaling:, service_mode:, start_byte:, bit_mask_length: nil, bit_right_shift: nil, is_signed: nil, signal_value_type: nil) ⇒ ObdSignalProperty

Returns a new instance of ObdSignalProperty.

Parameters:

  • byte_length (String)

    The length of a message.

  • offset (String)

    The offset used to calculate the signal value.

  • pid (String)

    The diagnostic code used to request data from a vehicle for this signal.

  • pid_response_length (String)

    The length of the requested data.

  • scaling (String)

    A multiplier used to decode the message.

  • service_mode (String)

    The mode of operation (diagnostic service) in a message.

  • start_byte (String)

    Indicates the beginning of the message.

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

    The number of bits to mask in a message.

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

    The number of positions to shift bits in the message.

  • is_signed (String, Boolean, AWSCDK::IResolvable, nil) (defaults to: nil)

    Determines whether the message is signed ( true ) or not ( false ).

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

    The value type of the signal.



1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
# File 'io_t_fleet_wise/cfn_decoder_manifest.rb', line 1205

def initialize(byte_length:, offset:, pid:, pid_response_length:, scaling:, service_mode:, start_byte:, bit_mask_length: nil, bit_right_shift: nil, is_signed: nil, signal_value_type: nil)
  @byte_length = byte_length
  Jsii::Type.check_type(@byte_length, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "byteLength")
  @offset = offset
  Jsii::Type.check_type(@offset, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "offset")
  @pid = pid
  Jsii::Type.check_type(@pid, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "pid")
  @pid_response_length = pid_response_length
  Jsii::Type.check_type(@pid_response_length, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "pidResponseLength")
  @scaling = scaling
  Jsii::Type.check_type(@scaling, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "scaling")
  @service_mode = service_mode
  Jsii::Type.check_type(@service_mode, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "serviceMode")
  @start_byte = start_byte
  Jsii::Type.check_type(@start_byte, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "startByte")
  @bit_mask_length = bit_mask_length
  Jsii::Type.check_type(@bit_mask_length, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "bitMaskLength") unless @bit_mask_length.nil?
  @bit_right_shift = bit_right_shift
  Jsii::Type.check_type(@bit_right_shift, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "bitRightShift") unless @bit_right_shift.nil?
  @is_signed = is_signed
  Jsii::Type.check_type(@is_signed, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoic3RyaW5nIn0seyJwcmltaXRpdmUiOiJib29sZWFuIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5JUmVzb2x2YWJsZSJ9XX19")), "isSigned") unless @is_signed.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

#bit_mask_lengthString? (readonly)

The number of bits to mask in a message.



1271
1272
1273
# File 'io_t_fleet_wise/cfn_decoder_manifest.rb', line 1271

def bit_mask_length
  @bit_mask_length
end

#bit_right_shiftString? (readonly)

The number of positions to shift bits in the message.



1276
1277
1278
# File 'io_t_fleet_wise/cfn_decoder_manifest.rb', line 1276

def bit_right_shift
  @bit_right_shift
end

#byte_lengthString (readonly)

The length of a message.



1234
1235
1236
# File 'io_t_fleet_wise/cfn_decoder_manifest.rb', line 1234

def byte_length
  @byte_length
end

#is_signedString, ... (readonly)

Determines whether the message is signed ( true ) or not ( false ).

If it's signed, the message can represent both positive and negative numbers. The is_signed parameter only applies to the INTEGER raw signal type, and it doesn't affect the FLOATING_POINT raw signal type. The default value is false .



1283
1284
1285
# File 'io_t_fleet_wise/cfn_decoder_manifest.rb', line 1283

def is_signed
  @is_signed
end

#offsetString (readonly)

The offset used to calculate the signal value.

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



1241
1242
1243
# File 'io_t_fleet_wise/cfn_decoder_manifest.rb', line 1241

def offset
  @offset
end

#pidString (readonly)

The diagnostic code used to request data from a vehicle for this signal.



1246
1247
1248
# File 'io_t_fleet_wise/cfn_decoder_manifest.rb', line 1246

def pid
  @pid
end

#pid_response_lengthString (readonly)

The length of the requested data.



1251
1252
1253
# File 'io_t_fleet_wise/cfn_decoder_manifest.rb', line 1251

def pid_response_length
  @pid_response_length
end

#scalingString (readonly)

A multiplier used to decode the message.



1256
1257
1258
# File 'io_t_fleet_wise/cfn_decoder_manifest.rb', line 1256

def scaling
  @scaling
end

#service_modeString (readonly)

The mode of operation (diagnostic service) in a message.



1261
1262
1263
# File 'io_t_fleet_wise/cfn_decoder_manifest.rb', line 1261

def service_mode
  @service_mode
end

#signal_value_typeString? (readonly)

The value type of the signal.

The default value is INTEGER .



1290
1291
1292
# File 'io_t_fleet_wise/cfn_decoder_manifest.rb', line 1290

def signal_value_type
  @signal_value_type
end

#start_byteString (readonly)

Indicates the beginning of the message.



1266
1267
1268
# File 'io_t_fleet_wise/cfn_decoder_manifest.rb', line 1266

def start_byte
  @start_byte
end

Class Method Details

.jsii_propertiesObject



1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
# File 'io_t_fleet_wise/cfn_decoder_manifest.rb', line 1292

def self.jsii_properties
  {
    :byte_length => "byteLength",
    :offset => "offset",
    :pid => "pid",
    :pid_response_length => "pidResponseLength",
    :scaling => "scaling",
    :service_mode => "serviceMode",
    :start_byte => "startByte",
    :bit_mask_length => "bitMaskLength",
    :bit_right_shift => "bitRightShift",
    :is_signed => "isSigned",
    :signal_value_type => "signalValueType",
  }
end

Instance Method Details

#to_jsiiObject



1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
# File 'io_t_fleet_wise/cfn_decoder_manifest.rb', line 1308

def to_jsii
  result = {}
  result.merge!({
    "byteLength" => @byte_length,
    "offset" => @offset,
    "pid" => @pid,
    "pidResponseLength" => @pid_response_length,
    "scaling" => @scaling,
    "serviceMode" => @service_mode,
    "startByte" => @start_byte,
    "bitMaskLength" => @bit_mask_length,
    "bitRightShift" => @bit_right_shift,
    "isSigned" => @is_signed,
    "signalValueType" => @signal_value_type,
  })
  result.compact
end