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 metricsPeriodstring '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 metricsPeriodstring '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 muteFlagboolean 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 resetTypestring | 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 mobileWakeupPeriodstring | 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 periodCodestring | 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 fieldNamestring The field name
messageIdnumber 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 messageMessageReturn 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 timestampstring datestamp
Returns:
Type Description number -
innerpopulateMobile(message){Mobile}
infra/messageCodecs/coreModem.js, line 45 -
Sets up mobile metadata template for update
Name Type Description messageMessage 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 numnumber A decimal number
placesnumber 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 yearnumber Full year UTC
monthnumber From 0..11 UTC
dayOfMonthnumber Day of month from 1..31 UTC
minuteOfDaynumber Minute of day from 0..1439 UTC
Returns:
Type Description Date