C++ TargetRTS
Loading...
Searching...
No Matches
RTcActors.h
1/*
2 * Licensed Materials - Property of HCL and/or IBM
3 * Copyright HCL Technologies Ltd. 2016, 2021. All Rights Reserved.
4 * Copyright IBM Corporation 1999, 2016. All Rights Reserved.
5 *
6 * U.S. Government Users Restricted Rights - Use, duplication or
7 * disclosure restricted by GSA ADP Schedule.
8 */
9
10#ifndef __RTcActors_h__
11#define __RTcActors_h__ included
12
13#ifndef __RTConfig_h__
14#include <RTConfig.h>
15#endif
16
17/*
18 * This file contains the public ROOM interface for C actors.
19 */
20
21#define RSLPANIC Panic
22#define RSLHIGH High
23#define RSLGENERAL General
24#define RSLLOW Low
25#define RSLBACKGROUND Background
26
27/*
28 * In the following macros the arguments have the following meanings
29 *
30 * d data to be sent in a message
31 * p port, SAP or SPP reference name
32 * i port index
33 * s signal name
34 * t timeout
35 * u priority (urgency)
36 */
37
38#define ROOM_CancelTimer(p,id) ((p).cancelTimer((id)))
39#define ROOM_InSignal(p,s) (s)
40#define ROOM_InformIn(p,t) ((p).informIn((t)))
41#define ROOM_InformInData(p,t,d) ((p).informIn((t),(d)))
42#define ROOM_IsTimerValid(id) ((id).isValid())
43#define ROOM_MessageData() (msg->data)
44#define ROOM_MessageDataPointer(type) (POINTER_OF(type)msg->data)
45#define ROOM_MessageDefer() (msg->defer())
46#define ROOM_MessageIndex() (msg->sapIndex0())
47#define ROOM_MessageSap() (*msg->sap())
48#define ROOM_MessageSignal() (msg->signal)
49#define ROOM_PortIndexedSend(p,i,s) ((p)[(i)]->send((s)))
50#define ROOM_PortIndexedSendData(p,i,s,d) \
51 ((p)[(i)]->send((s),(d)))
52#define ROOM_PortSend(p,s) ((p).send((s)))
53#define ROOM_PortSendData(p,s,d) ((p).send((s),(d)))
54#define ROOM_PrioritizedPortSend(p,s,u) ((p).send((s),(void*)0,(u)))
55#define ROOM_PrioritizedPortIndexedSend(p,i,s,u) \
56 ((p)[(i)]->send((s),(void*)0,(u)))
57#define ROOM_PrioritizedPortIndexedSendData(p,i,s,u,d) \
58 ((p)[(i)]->send((s),(d),(u)))
59#define ROOM_PrioritizedPortSendData(p,s,u,d) \
60 ((p).send((s),(d),(u)))
61#define ROOM_RecallAll(p) ((p).recallAll())
62#define ROOM_SAPDeRegister(p) ((p).deregister())
63#define ROOM_SAPRegister(p,name) ((p).registerAs((name)))
64#define ROOM_SPPDeRegister(p) ((p).deregister())
65#define ROOM_SPPRegister(p,name) ((p).registerAs((name)))
66#define ROOM_Signal(p,s) (s)
67#define RSL_Timeout() (timeout)
68
69#endif // __RTcActors_h__