3 #include <lib/dvb_ci/dvbci_mmi.h>
6 PyObject *list = PyList_New(len);
7 for (i=0; i<len; ++i) {
8 PyObject *tuple = PyTuple_New(3); // 3 eintrge im tuple
9 PyTuple_SetItem(tuple, 0, PyString_FromString("eintrag 1"))
10 PyTuple_SetItem(tuple, 1, PyInt_FromLong(31337));
11 PyTuple_SetItem(tuple, 2, PyString_FromString("eintrag 3"))
12 PyList_SetItem(list, i, tuple);
17 eDVBCIMMISession::eDVBCIMMISession(eDVBCISlot *tslot)
20 slot->mmi_session = this;
23 eDVBCIMMISession::~eDVBCIMMISession()
25 slot->mmi_session = 0;
28 int eDVBCIMMISession::receivedAPDU(const unsigned char *tag, const void *data, int len)
30 printf("SESSION(%d)/MMI %02x %02x %02x: ", session_nb, tag[0], tag[1],tag[2]);
31 for (int i=0; i<len; i++)
32 printf("%02x ", ((const unsigned char*)data)[i]);
35 if ((tag[0]==0x9f) && (tag[1]==0x88))
40 printf("MMI display control\n");
41 if (((unsigned char*)data)[0] != 1)
42 printf("kann ich nicht. aber das sag ich dem modul nicht.\n");
43 state=stateDisplayReply;
48 unsigned char *d=(unsigned char*)data;
49 unsigned char *max=((unsigned char*)d) + len;
50 printf("Tmenu_last\n");
58 printf("%d texts\n", n);
59 for (int i=0; i < (n+3); ++i)
64 printf("text tag: %02x %02x %02x\n", d[0], d[1], d[2]);
66 d+=parseLengthField(d, textlen);
67 printf("%d bytes text\n", textlen);
68 if ((d+textlen) > max)
77 printf("unknown APDU tag 9F 88 %02x\n", tag[2]);
84 int eDVBCIMMISession::doAction()
91 case stateDisplayReply:
93 unsigned char tag[]={0x9f, 0x88, 0x02};
94 unsigned char data[]={0x01, 0x01};
95 sendAPDU(tag, data, 2);
102 unsigned char tag[]={0x9f, 0x88, 0x0b};
103 unsigned char data[]={5};
104 sendAPDU(tag, data, 1);
116 int eDVBCIMMISession::stopMMI()
118 printf("eDVBCIMMISession::stopMMI()\n");
120 unsigned char tag[]={0x9f, 0x88, 0x00};
121 unsigned char data[]={0x00};
122 sendAPDU(tag, data, 1);