modification sendDateTime

Origin commit data
------------------
Branch: master
Commit: c41f0ea13d
Author: max_10 <max_10@gmx.de>
Date: 2017-10-23 (Mon, 23 Oct 2017)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
max_10
2017-10-23 23:16:18 +02:00
parent 176cffb538
commit bad7bdc89b
2 changed files with 31 additions and 27 deletions

View File

@@ -48,7 +48,17 @@ int eDVBCIDateTimeSession::doAction()
case stateStarted:
return 0;
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_loc;
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;
}
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:
eDVBCIDateTimeSession(eDVBCISlot *tslot);
~eDVBCIDateTimeSession();
void sendDateTime();
};
#endif