SimpleHartMote
Description
The SimpleHartMote application:
- Iterates through the API command space
- Exits
The mote must be in slave mode to use SimpleHartMote
Sample Output
Simple Application which interacts with the HART mote - (c) Dust Networks ================== Step 1. API exploration ======================== ===== Load the API definition of the HART mote done. ===== List all the defined command IDs: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 16, 17, 19, 20, 21, 23, 24, 25] ===== List all the defined command names: ['setParameter', 'getParameter', 'setNVParameter', 'getNVParameter', 'send', 'jo in', 'disconnect', 'reset', 'lowPowerSleep', 'hartPayload', 'testRadioTx', 'test RadioRx', 'clearNV', 'search', 'testRadioTxExt', 'testRadioRxExt', 'zeroize', 'f ileWrite', 'fileRead', 'fileOpen'] ===== Get the command name of command ID 4: getNVParameter ===== Get the command ID of command name 'getNVParameter': 4 ===== List the subcommand of command 'getNVParameter': ['macAddress', 'networkId', 'txPower', 'powerInfo', 'ttl', 'HARTantennaGain', 'O TAPlockout', 'hrCounterMode', 'autojoin', 'hartCompliantMode', 'lock', 'euCompli antMode'] ===== Get a description of the getNVParameter.powerInfo command: The getNVParameter<powerInfo> command returns the power supply information store d in mote's persistent storage. ===== List the name of the fields in the getNVParameter.powerInfo request: [] ===== List the name of the fields in the getNVParameter.powerInfo response: ['powerSource', 'dischargeCur', 'dischargeTime', 'recoverTime'] ===== List the name of the fields in the testRadioTx response: ['RC'] ===== Print the format of the testRadioTx 'RC' response field: int ===== Print the valid options of the testRadioTx 'RC' response field: [0, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18, 19] ===== Print the format of the getNVParameter.powerInfo 'powerSource' response field: int ===== Print the length of the getNVParameter.powerInfo 'powerSource' response field: 1 ===== Print the valid options of the getNVParameter.powerInfo 'powerSource' response f ield: [0, 1, 2] ===== Print the description of each valid options of the getNVParameter.powerInfo 'pow erSource' response field: ['Line', 'Battery', 'Rechargeable/Scavenging'] Script ended. Press Enter to exit.