Revision cd0cba58

View differences:

inc/urt_core.h
54 54

  
55 55
  void urtCoreInit(void);
56 56
  urt_status_t urtCoreGetStatus(void);
57
  urt_osEventMask_t urtCoreGetEventMask(void);
57 58
  urt_osMutex_t urtCoreGetMutex(void);
58 59
  urt_osEventSource_t* urtCoreGetEvtSource(void);
59 60
  urt_node_t* urtCoreGetNodes(void);
src/urt_core.c
92 92
  return core._status;
93 93
}
94 94

  
95
urt_osEventMask_t urtCoreGetEventMask(void)
96
{
97
    return EVENT_MASK(32);
98
}
99

  
95 100
/**
96 101
 * @brief   Get Core mutex.
97 102
 *
src/urt_node.c
51 51
void _main(void* arg)
52 52
{
53 53
  urt_osEventMask_t mask;
54
  urt_osEventFlags_t flag;   //TODO: flag from core here
54
  urt_osEventFlags_t flag = 0;
55 55
  urtEventRegister(urtCoreGetEvtSource(), &localNode.listener, mask, flag);
56 56
  if (localNode.setupcallback != NULL)
57 57
  {
58 58
    mask = localNode.setupcallback(&localNode, arg);
59
    if (mask /*TODO: check single bits from mask to find out if bit for core is 1 */)
59
    if (mask == urtCoreGetEventMask())
60 60
    {
61 61
        urtCoreStopNodes(URT_STATUS_NODE_INVALEVTMASK);
62 62
    }
......
75 75
  if (terminated /*TODO: replace with function*/)
76 76
  {
77 77
    urt_osEventMask_t temp = urtEventWait(mask, URT_EVENT_WAIT_ONE, URT_DELAY_INFINITE);
78
    if (temp /*TODO: check single bits from mask to find out if bit for core is 1 */)
78
    if (temp == urtCoreGetEventMask())
79 79
    {
80 80
      localNode.loopcallback(&localNode, mask, arg);
81 81
      #if (URT_CFG_PUBSUB_PROFILING || URT_CFG_RPC_PROFILING)
82 82
        localNode.loops++;
83 83
      #endif /* URT_CFG_PUBSUB_PROFILING || URT_CFG_RPC_PROFILING */
84
      if (mask /*TODO: check single bits from mask to find out if bit for core is 1 */)
84
      if (mask == urtCoreGetEventMask())
85 85
      {
86 86
        urtCoreStopNodes(URT_STATUS_NODE_INVALEVTMASK);
87 87
      }

Also available in: Unified diff