- #ifdef DELUGE
- case SERIALMSG_ADDR: // === Gets the physical starting address of a volume ===
- *(nx_uint32_t*)(&serialMsg_payload->data) =
- (uint32_t)call DelugeStorage.getPhysicalAddress[img_num](0);
- sendReply(SUCCESS, sizeof(SerialReplyPacket) + 4);
- break;
- case SERIALMSG_REPROG_BS: // === Reprograms only the base station ===
- state = S_REPROG;
- sendReply(SUCCESS, sizeof(SerialReplyPacket));
- img_num_reboot = img_num;
- call Timer.startOneShot(1024);
- break;
- case SERIALMSG_DISS: // === Starts disseminating a volume ===
- signal DissNotify.notify(img_num); // Notifies Deluge to start disseminate
- sendReply(SUCCESS, sizeof(SerialReplyPacket));
- break;
- case SERIALMSG_REPROG: // === Reprograms the network (except the base station) ===
- signal ReprogNotify.notify(img_num);
- sendReply(SUCCESS, sizeof(SerialReplyPacket));
- break;
- #endif
- }
+ case CMD_IDENT:
+ shortIdent = (nx_struct ShortIdent*)&reply->data;
+ memset(shortIdent, 0, sizeof(nx_struct ShortIdent));
+ memcpy(shortIdent->name, IDENT_APPNAME, sizeof(IDENT_APPNAME));
+ //memcpy(shortIdent->username, IDENT_USER_ID, sizeof(IDENT_USER_ID));
+ //memcpy(shortIdent->hostname, IDENT_HOSTNAME, sizeof(IDENT_HOSTNAME));
+ shortIdent->timestamp = IDENT_TIMESTAMP;
+ shortIdent->uidhash = IDENT_UIDHASH;
+ shortIdent->nodeid = TOS_NODE_ID;
+ sendReply(SUCCESS, sizeof(SerialReplyPacket) + sizeof(nx_struct ShortIdent));
+ break;
+ }
+ }