NanoPower P60 Dock
July 14, 2017
gs-man-nanopower-p60-dock-2.1
1000); /
*
Timeout in milliseconds
*
/
if (res > 0) {
printf("Get out_en[0]: %u\n", out_en);
}
The above example retrieves a single parameter. It is possible to retrieve all Housekeeping parameters by
retrieving the entire table:
#include <p60dock.h>
uint8_t hk_mem[P60DOCK_HK_SIZE];
param_index_t node_hk = {0};
uint8_t p60dock_node = 4;
node_hk.physaddr = hk_mem;
node_hk.table = p60dock_hk;
node_hk.mem_id = P60DOCK_HK;
node_hk.count = P60DOCK_HK_COUNT;
node_hk.size = P60DOCK_HK_SIZE;
int result = rparam_get_full_table(&node_hk,
p60dock_node,
P60_PORT_RPARAM,
node_hk.mem_id,
1000);
if (result != 0) {
printf("Error retrieving P60 Dock housekeeping\n");
} else {
printf("Retrieved P60 Dock housekeeping\n");
/
*
List all out_en[] values, using parameter name
*
/
const param_table_t
*
param = param_find_name(node_hk.table,
node_hk.count,
"out_en");
if (param != NULL) {
for (uint8_t index = 0; index < 13; index++) {
/
*
Read parameter using name
*
/
uint8_t
*
out_en = param_read_addr(param->addr + param->size
*
index,
&node_hk,
param->size);
printf("out_en[%d]: %u\n", index,
*
out_en);
}
}
/
*
List all c_out[] values, using parameter address
*
/
param = param_find_addr(node_hk.table, node_hk.count, 0x0000);
if (param != NULL) {
for (uint8_t index = 0; index < 13; index++) {
/
*
Read parameter using address
*
/
int16_t
*
c_out = param_read_addr(param->addr + param->size
*
index,
&node_hk,
param->size);
printf("c_out[%d]: %d mA\n", index,
*
c_out);
}
}
}
6.4 Reset Ground Watchdog Timer
The Ground Watchdog Timer is reset by a dedicated command to the P60 Dock. This can for example be used
as a ground communication watch dog, i.e. this command is issued to P60 Dock on each connection with the
ground station. If no communication has been received for a period of 48 hours P60 Dock will switch off and do
a reset back to default configuration.
© 2016 GomSpace Aps
15