tic  130
tim.hxx
Go to the documentation of this file.
1 
6 #ifndef _TINA_MUX_HXX__
7 #define _TINA_MUX_HXX__
8 
9 #include "cplRaw/flags.hxx"
10 #include "umi/umi_task.hxx"
11 #include "rio/protocols.hxx"
12 #include "tina/protocols.hxx"
13 #include "dino/dino.hxx"
14 
15 #define DO_FIFO_MUX 1
16 
17 namespace INdepDev100 {
18  namespace Umi=INdepUmi100;
19  namespace Rio=INdepRio100;
20  namespace Dino=INdepDino100;
21 
22  typedef int DelE;
23 
24 
25 
29  class TinaSampleServer;
30  class TinaSampleTask;
31 
32  class TicMux:public Failables , public Umi::PortMux, public Flags {
33 
34  private:
35  enum { ceTinaUser, ceTic, ceDino, ccPortTypes };
36  static PortClass mpPortClass[ccPortTypes+1];
37  class DinoSyncServerFunc;
38 
39 
40  /* server ports */
41  Port _mpPo[ccPortTypes];
42 
43  /* dino map */
44  typedef std::map<std::string, std::pair<int,int> > MpSgBi;
45  const MpSgBi mp;
46 
47  /* config string */
48  const char *_szConfig;
49 
50  bool isDinoInit() { return eatFlag(0x1)==0; }
51 
55  Umi::Task *createTask(Umi::Channel *, const PortClass *, Umi::Pmd pmd, Umi::PortMux *pma, int h);
56  void deleteTask(const PortClass*, Umi::Task *pta);
57  public:
58 
59  TicMux( Umi::Channel *pucDrv, const char* szConfig="" );
60  ~TicMux();
61  };
62 
66  class FifoMux: public Umi::Plexer {
67  Umi::UmiChannel *_pucDrv;
68  Umi::UmiChannel *_pucMux;
69 
70  Umi::UmiChannel *pucDrv() { return _pucDrv; } /* to device hardware */
71  Umi::UmiChannel *pucMux() { return _pucMux; } /* to device user */
72 
73 
74  public:
75  void sigDown(int iCtx, Umi::Channel *pcn, int hChan);
76  void sigUp(int iCtx, Umi::Channel *pcn, int hChan);
77 
78 
79  FifoMux( Umi::UmiChannel *pucDrv, Umi::UmiChannel *pucMux );
80  ~FifoMux();
81  };
82 
83 }
84 
85 
86 #endif
fifo manager
Definition: tim.hxx:66
Definition: tinacp.cxx:88
Definition: tim.hxx:32
Definition: tap.cxx:6
Definition: tinacp.cxx:82
Failable with reason stack.
Definition: failable.hxx:95