Core Modem Codec module
Methods
-
innercommandGetBroadcastIds(){MessageForward}
infra/messageCodecs/coreModem.js, line 872 -
Gets provisioned Broadcast IDs
Returns:
Type Description MessageForward The forward message -
innercommandGetLastRxInfo(){MessageForward}
infra/messageCodecs/coreModem.js, line 811 -
Gets modem last receive information
Returns:
Type Description MessageForward The message -
innercommandGetLocation(){Object}
infra/messageCodecs/coreModem.js, line 791 -
Returns payload for location request
Returns:
Type Description Object payload -
innercommandGetModemConfiguration(){MessageForward}
infra/messageCodecs/coreModem.js, line 801 -
Gets modem configuration
Returns:
Type Description MessageForward The message -
innercommandGetRxMetrics(metricsPeriod){MessageForward}
infra/messageCodecs/coreModem.js, line 823 -
Returns a JSON payload to query modem Transmit metrics
Name Type Default Description metricsPeriod
string 'LastPartialMinute' optional Returns:
Type Description MessageForward The forward message -
innercommandGetTxMetrics(metricsPeriod){MessageForward}
infra/messageCodecs/coreModem.js, line 842 -
Returns a JSON payload to query modem Transmit metrics
Name Type Default Description metricsPeriod
string 'LastPartialMinute' optional Returns:
Type Description MessageForward The forward message -
innercommandModemPing(){MessageForward}
infra/messageCodecs/coreModem.js, line 860 -
Returns payload for a modem ping request
Returns:
Type Description MessageForward The forward message -
innercommandMute(muteFlag){MessageForward}
infra/messageCodecs/coreModem.js, line 779 -
Mutes or unmutes the modem transmitter
Name Type Description muteFlag
boolean Set or clear transmit mute
Returns:
Type Description MessageForward The forward message -
innercommandReset(resetType){MessageForward}
infra/messageCodecs/coreModem.js, line 696 -
Encodes the modem reset message based on the reset type
Name Type Default Description resetType
string | number 'ModemFlush' optional Throws:
-
on invalid resetType
- Type
- Error
Returns:
Type Description MessageForward Message and raw payload number array -
-
innercommandSetMobileWakeupPeriod(mobileWakeupPeriod){MessageForward}
infra/messageCodecs/coreModem.js, line 730 -
Returns a setWakeupPeriod message
Name Type Description mobileWakeupPeriod
string | number A valid wakeupPeriod
Throws:
-
if mobileWakeupPeriod is invalid
- Type
- Error
Returns:
Type Description MessageForward The forward message -
-
innergetMetricsPeriod(periodCode){string}
infra/messageCodecs/coreModem.js, line 394 -
Returns a string value of the metrics period, since it may not be an integer (e.g. 'partial minute' is non-specific)
Name Type Description periodCode
string | number The period over which metrics were calculated by the modem
Throws:
-
if periodCode invalid
- Type
- Error
Returns:
Type Description string the enumerated period -
-
innerhandleUnknownField(fieldName, messageId)
infra/messageCodecs/coreModem.js, line 63 -
Logs a warning for parsing unknown field names
Name Type Description fieldName
string The field name
messageId
number The message ID
-
innerparseCoreModem(message){Object}
infra/messageCodecs/coreModem.js, line 74 -
Parses Inmarsat-defined standard modem Mobile-Originated messages and emits various events
Name Type Description message
MessageReturn The message with metadata
Returns:
Type Description Object mobile metadata -
innerpingTime(timestamp){number}
infra/messageCodecs/coreModem.js, line 573 -
Returns the converted pingTime field value from timestamp
Name Type Description timestamp
string datestamp
Returns:
Type Description number -
innerpopulateMobile(message){Mobile}
infra/messageCodecs/coreModem.js, line 45 -
Sets up mobile metadata template for update
Name Type Description message
Message A Return or Forward message
Returns:
Type Description Mobile A Mobile object -
innerroundTo(num, places){number}
infra/messageCodecs/coreModem.js, line 20 -
Rounds a number to a certain decimal precision
Name Type Description num
number A decimal number
places
number The number of decimal places to round to
Returns:
Type Description number rounded -
innertimestampFromMinuteDay(year, month, dayOfMonth, minuteOfDay){Date}
infra/messageCodecs/coreModem.js, line 33 -
Returns a datestamp from a day and minute, assuming the current year
Name Type Description year
number Full year UTC
month
number From 0..11 UTC
dayOfMonth
number Day of month from 1..31 UTC
minuteOfDay
number Minute of day from 0..1439 UTC
Returns:
Type Description Date