static void gen_emodify( const act* action, int column) { TEXT s1[MAX_REF_SIZE], s2[MAX_REF_SIZE]; const upd* modify = (upd*) action->act_object; for (const ref* reference = modify->upd_port->por_references; reference; reference = reference->ref_next) { const ref* source = reference->ref_source; if (!source) { continue; } const gpre_fld* field = reference->ref_field; align(column); switch (field->fld_dtype) { case dtype_text: fprintf(gpreGlob.out_file, "jrd_ftof (%s, %d, %s, %d);", gen_name(s1, source), field->fld_length, gen_name(s2, reference), field->fld_length); break; case dtype_cstring: fprintf(gpreGlob.out_file, "gds__vtov((const char*) %s, (char*) %s, %d);", gen_name(s1, source), gen_name(s2, reference), field->fld_length); break; default: fprintf(gpreGlob.out_file, "%s = %s;", gen_name(s1, reference), gen_name(s2, source)); } } gen_send(action->act_request, modify->upd_port, column, false); }
static void gen_s_fetch( const act* action, int column) { const gpre_req* request = action->act_request; if (request->req_sync) gen_send(request, request->req_sync, column, false); gen_receive(action->act_request, request->req_primary); }
static void gen_start( const gpre_req* request, const gpre_port* port, int column, bool special) { align(column); fprintf(gpreGlob.out_file, "EXE_start (tdbb, %s, %s);", request->req_handle, request->req_trans); if (port) gen_send(request, port, column, special); }
static void gen_endfor( const act* action, int column) { const gpre_req* request = action->act_request; column += INDENT; if (request->req_sync) gen_send(request, request->req_sync, column, false); endp(column); }
/* Function: Reset the Network Returns: Integer that determines if there has been any error error=2 --> The command has not been executed error=1 --> There has been an error while executing the command error=0 --> The command has been executed with no errors Values: Change the NR command Parameters: reset --> Possible values are 0/1 0: reset the node network interface 1: reset the entirely network */ uint8_t WaspXBeeZB::resetNetwork(uint8_t reset) { int8_t error=2; error_AT=2; gen_data(reset_network_ZB,reset); gen_checksum(reset_network_ZB); error=gen_send(reset_network_ZB); return error; }
/* Function: Restore module parameters to compiled defaults Returns: Integer that determines if there has been any error error=2 --> The command has not been executed error=1 --> There has been an error while executing the command error=0 --> The command has been executed with no errors Values: Executes the R1 command. */ uint8_t WaspXBee900::restoreCompiled() { int8_t error=2; error_AT=2; char buffer[20]; //restore_compiled_900 strcpy_P(buffer, (char*)pgm_read_word(&(table_900[6]))); gen_data(buffer); error=gen_send(buffer); return error; }
/* Function: Get the Mac Mode Returns: Integer that determines if there has been any error error=2 --> The command has not been executed error=1 --> There has been an error while executing the command error=0 --> The command has been executed with no errors Values: Stores in global "macMode" variable the Mac Mode */ uint8_t WaspXBee802::getMacMode() { int8_t error=2; error_AT=2; gen_data(get_mac_mode_802); error=gen_send(get_mac_mode_802); if(!error) { macMode=data[0]; } return error; }
/* Function: Returns the number of children which can still connect to the current device Returns: Integer that determines if there has been any error error=2 --> The command has not been executed error=1 --> There has been an error while executing the command error=0 --> The command has been executed with no errors Values: Executes the NC command. Stores in global "remainingChildren" variable the number of remaining children which can connect to this device */ uint8_t WaspXBeeZB::getRemainingChildren() { int8_t error=2; error_AT=2; gen_data(get_rem_children_ZB); error=gen_send(get_rem_children_ZB); if(error==0) { remainingChildren=data[0]; } return error; }
/* Function: Read the time that a Coordinator/Router allows nodes to join Returns: Integer that determines if there has been any error error=2 --> The command has not been executed error=1 --> There has been an error while executing the command error=0 --> The command has been executed with no errors Values: Executes the NJ command. Stores in global "joinTime" variable the time allowing join */ uint8_t WaspXBeeZB::getJoinTime() { int8_t error=2; error_AT=2; gen_data(get_join_time_ZB); error=gen_send(get_join_time_ZB); if(error==0) { joinTime=data[0]; } return error; }
/* Function: Get the Energy Threshold used in the CCA process Returns: Integer that determines if there has been any error error=2 --> The command has not been executed error=1 --> There has been an error while executing the command error=0 --> The command has been executed with no errors Values: Stores in global "energyThreshold" variable any error happened while execution */ uint8_t WaspXBee802::getEnergyThreshold() { int8_t error=2; error_AT=2; gen_data(get_energy_thres_802); error=gen_send(get_energy_thres_802); if(!error) { energyThreshold=data[0]; } return error; }
/* Function: Get the ZigBee Stack profile Returns: Integer that determines if there has been any error error=2 --> The command has not been executed error=1 --> There has been an error while executing the command error=0 --> The command has been executed with no errors Values: Change the ZS command. Stores in global "stackProfile" variable the stack profile */ uint8_t WaspXBeeZB::getStackProfile() { int8_t error=2; error_AT=2; gen_data(get_stack_profile_ZB); error=gen_send(get_stack_profile_ZB); if(error==0) { stackProfile=data[0]; } return error; }
/* Function: Gets the number of additional broadcast retransmissions Returns: Integer that determines if there has been any error error=2 --> The command has not been executed error=1 --> There has been an error while executing the command error=0 --> The command has been executed with no errors Values: Executes the MT command */ uint8_t WaspXBee868::getMultipleBroadcast() { int8_t error=2; error_AT=2; gen_data(get_mult_broadcast_868); error=gen_send(get_mult_broadcast_868); if(error==0) { multipleBroadcast=data[0]; } return error; }
/* Function: Gets the number of retries than can be sent for a given unicast RF packet Returns: Integer that determines if there has been any error error=2 --> The command has not been executed error=1 --> There has been an error while executing the command error=0 --> The command has been executed with no errors Values: Executes the RR command */ uint8_t WaspXBee868::getMacRetries() { int8_t error=2; error_AT=2; gen_data(get_retries_868); error=gen_send(get_retries_868); if(error==0) { macRetries=data[0]; } return error; }
/* Function: Get the maximum number of hops for each broadcast data transmission Returns: Integer that determines if there has been any error error=2 --> The command has not been executed error=1 --> There has been an error while executing the command error=0 --> The command has been executed with no errors Values: Executes the BH command. Stores in global "maxBroadcastHops" variable the max number of broadcast hops */ uint8_t WaspXBeeZB::getMaxBroadcastHops() { int8_t error=2; error_AT=2; gen_data(get_max_brd_hops_ZB); error=gen_send(get_max_brd_hops_ZB); if(error==0) { maxBroadcastHops=data[0]; } return error; }
/* Function: Read the join notification setting Returns: Integer that determines if there has been any error error=2 --> The command has not been executed error=1 --> There has been an error while executing the command error=0 --> The command has been executed with no errors Values: Executes the JN command. Stores in global "error" variable any error happened while execution */ uint8_t WaspXBeeZB::getJoinNotification() { int8_t error=2; error_AT=2; gen_data(get_join_notif_ZB); error=gen_send(get_join_notif_ZB); if(error==0) { joinNotification=data[0]; } return error; }
/* Function: Get the % it has been used of available Duty Cicle Returns: Integer that determines if there has been any error error=2 --> The command has not been executed error=1 --> There has been an error while executing the command error=0 --> The command has been executed with no errors Values: Executes the DC command */ uint8_t WaspXBee868::getDutyCicle() { int8_t error=2; error_AT=2; gen_data(get_duty_cicle_868); error=gen_send(get_duty_cicle_868); if(error==0) { dutyCicle=data[0]; } return error; }
/* Function: Tells the reason for the last module reset Returns: Integer that determines if there has been any error error=2 --> The command has not been executed error=1 --> There has been an error while executing the command error=0 --> The command has been executed with no errors Values: Executes the R# command */ uint8_t WaspXBee868::getResetReason() { int8_t error=2; error_AT=2; gen_data(get_reset_reason_868); error=gen_send(get_reset_reason_868); if(error==0) { resetReason=data[0]; } return error; }
/* Function: Read the channel verification parameter Returns: Integer that determines if there has been any error error=2 --> The command has not been executed error=1 --> There has been an error while executing the command error=0 --> The command has been executed with no errors Values: Executes the JV command. Stores in global "channelVerification" variable any error happened while execution */ uint8_t WaspXBeeZB::getChannelVerification() { int8_t error=2; error_AT=2; gen_data(get_channel_verif_ZB); error=gen_send(get_channel_verif_ZB); if(error==0) { channelVerification=data[0]; } return error; }
/* Function: Get the minimum value of the back-off exponent in CSMA/CA Returns: Integer that determines if there has been any error error=2 --> The command has not been executed error=1 --> There has been an error while executing the command error=0 --> The command has been executed with no errors Values: Stores in global "delaySlots" variable the back-off exponent */ uint8_t WaspXBee802::getDelaySlots() { int8_t error=2; error_AT=2; gen_data(get_delay_slots_802); error=gen_send(get_delay_slots_802); if(!error) { delaySlots=data[0]; } return error; }
/* Function: Read options for encryption Returns: Integer that determines if there has been any error error=2 --> The command has not been executed error=1 --> There has been an error while executing the command error=0 --> The command has been executed with no errors Values: Executes the EO command. Stores in global "encrypOptions" variable any error happened while execution */ uint8_t WaspXBeeZB::getEncryptionOptions() { int8_t error=2; error_AT=2; gen_data(get_encryp_options_ZB); error=gen_send(get_encryp_options_ZB); if(error==0) { encryptOptions=data[0]; } return error; }
/* Function: Read the power mode of the device Returns: Integer that determines if there has been any error error=2 --> The command has not been executed error=1 --> There has been an error while executing the command error=0 --> The command has been executed with no errors Values: Executes the PM command. Stores in global "powerMode" variable the power mode */ uint8_t WaspXBeeZB::getPowerMode() { int8_t error=2; error_AT=2; gen_data(get_power_mode_ZB); error=gen_send(get_power_mode_ZB); if(error==0) { powerMode=data[0]; } return error; }
/* Function: Read information regarding last node join request Returns: Integer that determines if there has been any error error=2 --> The command has not been executed error=1 --> There has been an error while executing the command error=0 --> The command has been executed with no errors Values: Executes the AI command. Stores in global "associationIndication" variable any error happened while execution */ uint8_t WaspXBeeZB::getAssociationIndication() { int8_t error=2; error_AT=2; gen_data(get_assoc_indic_ZB); error=gen_send(get_assoc_indic_ZB); if(error==0) { associationIndication=data[0]; } return error; }
/* Function: Get time between consecutive aggregate route broadcast messages Returns: Integer that determines if there has been any error error=2 --> The command has not been executed error=1 --> There has been an error while executing the command error=0 --> The command has been executed with no errors Values: Executes the AR command. Stores in global "aggregateNotification" variable the time */ uint8_t WaspXBeeZB::getAggregateNotification() { int8_t error=2; error_AT=2; gen_data(get_aggreg_notif_ZB); error=gen_send(get_aggreg_notif_ZB); if(error==0) { aggregateNotification=data[0]; } return error;; }
/* Function: Set the ZigBee Stack profile Returns: Integer that determines if there has been any error error=2 --> The command has not been executed error=1 --> There has been an error while executing the command error=0 --> The command has been executed with no errors Values: Change the ZS command Parameters: profile: choosen stack profile (0-2) */ uint8_t WaspXBeeZB::setStackProfile(uint8_t profile) { int8_t error=2; error_AT=2; gen_data(set_stack_profile_ZB,profile); gen_checksum(set_stack_profile_ZB); error=gen_send(set_stack_profile_ZB); if(error==0) { stackProfile=profile; } return error; }
/* Function: Set the time that a Coordinator/Router allows nodes to join Returns: Integer that determines if there has been any error error=2 --> The command has not been executed error=1 --> There has been an error while executing the command error=0 --> The command has been executed with no errors Values: Change the NJ command Parameters: time: time allowed for joining (0x00-0xFF) */ uint8_t WaspXBeeZB::setJoinTime(uint8_t time) { int8_t error=2; error_AT=2; gen_data(set_join_time_ZB,time); gen_checksum(set_join_time_ZB); error=gen_send(set_join_time_ZB); if(error==0) { joinTime=time; } return error; }
/* Function: Set the channel verification parameter Returns: Integer that determines if there has been any error error=2 --> The command has not been executed error=1 --> There has been an error while executing the command error=0 --> The command has been executed with no errors Values: Change the JV command Parameters: verif: channel verification parameter (0-1) */ uint8_t WaspXBeeZB::setChannelVerification(uint8_t verif) { int8_t error=2; error_AT=2; gen_data(set_channel_verif_ZB,verif); gen_checksum(set_channel_verif_ZB); error=gen_send(set_channel_verif_ZB); if(error==0) { channelVerification=verif; } return error; }
/* Function: Set the join notification setting Returns: Integer that determines if there has been any error error=2 --> The command has not been executed error=1 --> There has been an error while executing the command error=0 --> The command has been executed with no errors Values: Change the JN command Parameters: notif: join notification setting (0-1) */ uint8_t WaspXBeeZB::setJoinNotification(uint8_t notif) { int8_t error=2; error_AT=2; gen_data(set_join_notif_ZB,notif); gen_checksum(set_join_notif_ZB); error=gen_send(set_join_notif_ZB); if(error==0) { joinNotification=notif; } return error; }
/* Function: Set the power mode of the device Returns: Integer that determines if there has been any error error=2 --> The command has not been executed error=1 --> There has been an error while executing the command error=0 --> The command has been executed with no errors Values: Change the PM command Parameters: power: power mode (0-1) */ uint8_t WaspXBeeZB::setPowerMode(uint8_t power) { int8_t error=2; error_AT=2; gen_data(set_power_mode_ZB,power); gen_checksum(set_power_mode_ZB); error=gen_send(set_power_mode_ZB); if(error==0) { powerMode=power; } return error; }
/* Function: Configure options for encryption Returns: Integer that determines if there has been any error error=2 --> The command has not been executed error=1 --> There has been an error while executing the command error=0 --> The command has been executed with no errors Values: Change the EO command Parameters: eoptions: options for encryption (0x00-0xFF) */ uint8_t WaspXBeeZB::setEncryptionOptions(uint8_t eoptions) { int8_t error=2; error_AT=2; gen_data(set_encryp_options_ZB,eoptions); gen_checksum(set_encryp_options_ZB); error=gen_send(set_encryp_options_ZB); if(error==0) { encryptOptions=eoptions; } return error; }
/* Function: Set time between consecutive aggregate route broadcast messages Returns: Integer that determines if there has been any error error=2 --> The command has not been executed error=1 --> There has been an error while executing the command error=0 --> The command has been executed with no errors Values: Change the AR command Parameters: anotif: time between consecutive aggregate route broadcast messages (0x00-0xFF) */ uint8_t WaspXBeeZB::setAggregateNotification(uint8_t anotif) { int8_t error=2; error_AT=2; gen_data(set_aggreg_notif_ZB,anotif); gen_checksum(set_aggreg_notif_ZB); error=gen_send(set_aggreg_notif_ZB); if(error==0) { aggregateNotification=anotif; } return error; }