modification sendDateTime

This commit is contained in:
max_10
2017-10-23 23:16:18 +02:00
parent 42811846d7
commit c41f0ea13d
2 changed files with 31 additions and 27 deletions

View File

@@ -48,7 +48,17 @@ int eDVBCIDateTimeSession::doAction()
case stateStarted: case stateStarted:
return 0; return 0;
case stateSendDateTime: case stateSendDateTime:
{ sendDateTime();
return 0;
case stateFinal:
printf("stateFinal und action! kann doch garnicht sein ;)\n");
default:
return 0;
}
}
void eDVBCIDateTimeSession::sendDateTime()
{
struct tm tm_gmt; struct tm tm_gmt;
struct tm tm_loc; struct tm tm_loc;
unsigned char tag[3] = {0x9f, 0x84, 0x41}; // date_time_response unsigned char tag[3] = {0x9f, 0x84, 0x41}; // date_time_response
@@ -74,11 +84,4 @@ int eDVBCIDateTimeSession::doAction()
msg[6] = htons(tm_loc.tm_gmtoff / 60) & 0xff; msg[6] = htons(tm_loc.tm_gmtoff / 60) & 0xff;
} }
sendAPDU(tag, msg, 7); sendAPDU(tag, msg, 7);
return 0;
}
case stateFinal:
printf("stateFinal und action! kann doch garnicht sein ;)\n");
default:
return 0;
}
} }

View File

@@ -13,6 +13,7 @@ class eDVBCIDateTimeSession: public eDVBCISession
public: public:
eDVBCIDateTimeSession(eDVBCISlot *tslot); eDVBCIDateTimeSession(eDVBCISlot *tslot);
~eDVBCIDateTimeSession(); ~eDVBCIDateTimeSession();
void sendDateTime();
}; };
#endif #endif