- command error_t RxEnableStateChange.enable(){return FAIL;}
- command error_t RxEnableStateChange.disable(){return FAIL;}
-
-/* ----------------------- Promiscuous Mode ----------------------- */
-
- command bool PromiscuousModeGet.get()
- {
- return (m_promiscuousState == S_STARTED);
- }
-
- command error_t PromiscuousMode.start()
- {
- if (m_promiscuousState != S_IDLE)
- return FAIL;
- m_promiscuousState = S_STARTING;
- call Token.request();
- call Debug.log(LEVEL_INFO, EnableRxP_PROMISCUOUS_REQUEST, m_promiscuousState, 0, 0);
- call Debug.flush();
- return SUCCESS;
- }
-
- event void Token.granted()
- {
- if (m_promiscuousState != S_STARTING){
- call Token.release();
- return;
- }
- call RadioPromiscuousMode.set(TRUE);
- if (call PromiscuousRx.prepare() != IEEE154_SUCCESS){
- m_promiscuousState = S_IDLE;
- call Token.release();
- call Debug.log(LEVEL_IMPORTANT, EnableRxP_RADIORX_ERROR, 0, 0, 0);
- signal PromiscuousMode.startDone(FAIL);
- }
- }
-
- async event void PromiscuousRx.prepareDone()
- {
- post prepareDoneTask();
- }
-
- task void prepareDoneTask()
- {
- if (m_promiscuousState != S_STARTING){
- call Token.release();
- return;
- }
- m_promiscuousState = S_STARTED;
- call PromiscuousRx.receive(NULL, 0);
- signal PromiscuousMode.startDone(SUCCESS);
- call Debug.log(LEVEL_INFO, EnableRxP_PROMISCUOUS_ON, m_promiscuousState, 0, 0);
- }
-
- event message_t* PromiscuousRx.received(message_t *frame, ieee154_reftime_t *timestamp)
- {
- if (m_promiscuousState == S_STARTED){
- ((ieee154_header_t*) frame->header)->length |= FRAMECTL_PROMISCUOUS;
- return signal FrameRx.received(frame);
- } else
- return frame;
- }
-
- command error_t PromiscuousMode.stop()
- {
- if (m_promiscuousState != S_STARTED)
- return FAIL;
- m_promiscuousState = S_STOPPING;
- call RadioOff.off();
- return SUCCESS;
- }
-
- async event void RadioOff.offDone()
- {
- post radioOffDoneTask();
- }
-
- task void radioOffDoneTask()
- {
- if (m_promiscuousState != S_STOPPING){
- call Token.release();
- return;
- }
- m_promiscuousState = S_IDLE;
- call RadioPromiscuousMode.set(FALSE);
- call Token.release();
- signal PromiscuousMode.stopDone(SUCCESS);
- call Debug.log(LEVEL_INFO, EnableRxP_PROMISCUOUS_OFF, m_promiscuousState, 0, 0);
- }
-
- default event void PromiscuousMode.startDone(error_t error){}
- default event void PromiscuousMode.stopDone(error_t error){}
- default event void MLME_RX_ENABLE.confirm(ieee154_status_t status){}
+ command error_t RxEnableStateChange.enable() {return FAIL;}
+ command error_t RxEnableStateChange.disable() {return FAIL;}
+ default event void MLME_RX_ENABLE.confirm(ieee154_status_t status) {}
+ default async command uint32_t IncomingSuperframeStructure.sfStartTime() {return 0;}
+ default async command uint16_t IncomingSuperframeStructure.sfSlotDuration() {return 0;}
+ default async command uint32_t OutgoingSuperframeStructure.sfStartTime() {return 0;}
+ default async command uint16_t OutgoingSuperframeStructure.sfSlotDuration() {return 0;}
+ default async command bool IsTrackingBeacons.getNow() { return FALSE;}
+ default async command bool IsSendingBeacons.getNow() { return FALSE;}
+ default command ieee154_macPanCoordinator_t IsMacPanCoordinator.get() { return FALSE;}