23 #include <boost/intrusive_ptr.hpp> 24 #include <boost/shared_ptr.hpp> 28 #include "INPLRuntime.h" 29 #include "NPLInterface.hpp" 31 #include "util/Mutex.hpp" 32 #include "util/Semaphore.hpp" 39 #ifdef USE_BOOST_SIGNAL_FILE_HANDLER 40 #include <boost/signals2.hpp> 42 #include <boost/function.hpp> 47 #pragma region Headers 52 NPLMiniMessage(
const char * sNPLFilename,
const char* sCode,
int nCodeLength=0)
83 template <
class StringType = std::
string>
122 FromString(filename);
132 sRelativePath = sPath;
133 nCount = (int)sRelativePath.size();
137 sRelativePath.assign(sPath, nCount);
139 for(
int i=0; i<nCount ;i++)
141 if(sRelativePath[i] ==
'\\')
142 sRelativePath[i] =
'/';
155 void ToString(std::string & output){
157 if(!sRuntimeStateName.empty())
160 output.append(sRuntimeStateName);
167 if( ! sRelativePath.empty() )
168 output.append(sRelativePath);
169 if( ! sDNSServerName.empty() )
172 output.append(sDNSServerName);
181 if(sFilePath[0] ==
'\0')
184 sRuntimeStateName.clear();
186 sDNSServerName.clear();
187 sRelativePath.clear();
193 int nRelativePathIndex;
196 bool bExplicitActivationType =
false;
198 if(sFilePath[i] ==
'(')
200 bExplicitActivationType =
true;
202 while( (sFilePath[i]!=
')') && (sFilePath[i]!=
'\0'))
207 if( !(i==4 && (sFilePath[1]==
'g') && (sFilePath[2]==
'l')) )
208 sRuntimeStateName.assign(sFilePath+1, i-2);
210 sRuntimeStateName.clear();
215 while( (sFilePath[i]!=
':') && (sFilePath[i]!=
'\0'))
218 if(sFilePath[i]==
'\0')
221 sRelativePath.assign(sFilePath+nNIDIndex, i-nNIDIndex);
222 sDNSServerName.clear();
228 sNID.assign(sFilePath+nNIDIndex, i-nNIDIndex);
233 nRelativePathIndex = i+1;
238 while( (sFilePath[i]!=
'@') && (sFilePath[i]!=
'\0') )
240 SetRelativePath(sFilePath+nRelativePathIndex, i - nRelativePathIndex);
242 if(sFilePath[i]==
'\0')
244 sDNSServerName.clear();
253 while( sFilePath[i]!=
'\0')
255 sDNSServerName.assign(sFilePath+nDNSServerIndex, i - nDNSServerIndex);
260 #pragma endregion Headers 262 #pragma region CNPLMiniState 274 public boost::enable_shared_from_this<CNPLMiniState>,
275 private boost::noncopyable
278 #ifdef USE_BOOST_SIGNAL_FILE_HANDLER 279 typedef boost::signals2::signal< void(int, void*) > NPLFileActivateHandler_t;
280 typedef NPLFileActivateHandler_t::slot_type NPLFileActivateHandlerCallback_t;
282 typedef std::map<std::string, boost::shared_ptr<typename NPLFileActivateHandler_t> > NPLFileHandlerMap_t;
284 typedef boost::function< void(int, void*) > NPLFileActivateHandler_t;
285 typedef boost::function< void(int, void*) > NPLFileActivateHandlerCallback_t;
286 typedef std::map<std::string, typename NPLFileActivateHandler_t> NPLFileHandlerMap_t;
288 typedef std::queue<NPLMiniMessage> NPLMiniMessageQueue_t;
291 CNPLMiniState(
const char* name=NULL): m_current_msg_length(0), m_current_msg(NULL),m_pNPLRuntime(NULL), m_processed_msg_count(0) {
306 m_pState->SetCurrentMessage(msg,nLength);
310 m_pState->SetCurrentMessage(NULL, 0);
317 virtual const std::string&
GetName()
const {
return m_name;};
322 virtual int activate(
const char * sNPLFilename,
const char* sCode,
int nCodeLength=0,
int priority=2,
int reliability=4){
328 m_input_queue.push(
NPLMiniMessage(sNPLFilename, sCode, nCodeLength));
340 virtual NPL::NPLReturnCode
Activate_async(
const std::string & filepath,
const char *
code = NULL,
int nLength=0,
int priority=0) {
341 return (NPL::NPLReturnCode)activate(filepath.c_str(),
code, nLength);
345 virtual NPL::NPLReturnCode
ActivateLocal(
const char* filepath,
const char *
code = NULL,
int nLength=0,
int priority=0) {
346 return (NPL::NPLReturnCode)activate(filepath,
code, nLength);
355 virtual NPL::NPLReturnCode
Activate_async(NPL::NPLMessage_ptr& msg,
int priority=0) {
return NPL::NPL_OK;}
365 virtual NPL::NPLReturnCode
SendMessage(NPL::NPLMessage_ptr& msg,
int priority=0) {
return NPL::NPL_OK;}
381 virtual void WriteLog(
const char* text,
int nTextLen=0,
int nLogType = 0) {}
400 virtual bool SetTimer(
int nIDEvent,
float fElapse,
const char* sNeuronFile) {
return false;};
421 virtual bool ChangeTimer(
int nIDEvent,
int dueTime,
int period) {
return false;};
430 virtual void call(
const char * sNPLFilename,
const char* sCode,
int nCodeLength = 0){};
438 while(!m_input_queue.empty())
440 ProcessMsg(m_input_queue.front());
456 std::string sFileName = filename;
459 #ifdef USE_BOOST_SIGNAL_FILE_HANDLER 460 NPLFileHandlerMap_t::iterator iter = m_file_handlers_map.find(sFileName);
461 if( iter == m_file_handlers_map.end() )
465 m_file_handlers_map[sFileName]->connect(fileCallback);
467 m_file_handlers_map[sFileName] = fileCallback;
473 void SetCurrentMessage(
const char* msg,
int nLength)
476 m_current_msg_length = nLength;
482 ++ m_processed_msg_count;
486 NPLFileHandlerMap_t::iterator iter = m_file_handlers_map.find(msg.
m_sFilename);
487 if( iter!= m_file_handlers_map.end() )
490 #ifdef USE_BOOST_SIGNAL_FILE_HANDLER 525 #pragma endregion CNPLMiniState 527 #pragma region CNPLMiniRuntime 548 template <
class NPL_STATE = CNPLMiniState>
553 typedef std::vector<NPLRuntimeState_ptr> NPLRuntime_Temp_Pool_Type;
558 bool operator()(
const NPLRuntimeState_ptr & a,
const NPLRuntimeState_ptr & b )
const 559 {
return a.get() < b.get(); }
561 typedef std::set <NPLRuntimeState_ptr, NPLRuntimeState_PtrOps> NPLRuntime_Pool_Type;
573 if(m_runtime_state_main.get() == 0)
586 virtual void Run(
bool bToEnd =
true)
592 NPLRuntime_Pool_Type::const_iterator iter, iter_end = m_runtime_states.end();
593 for(iter = m_runtime_states.begin(); iter!=iter_end; ++iter)
595 m_temp_rts_pool.push_back(*iter);
599 NPLRuntime_Temp_Pool_Type::iterator itCur, itEnd = m_temp_rts_pool.end();
600 for (itCur = m_temp_rts_pool.begin(); itCur != itEnd; ++itCur)
604 m_temp_rts_pool.clear();
609 m_runtime_state_main.reset();
610 m_runtime_states.clear();
611 m_active_state_map.clear();
630 return CreateRuntimeState(name, type_).get();
639 return m_runtime_state_main.get();
641 return GetRuntimeState(name).get();
646 return CreateGetRuntimeState(name, type_).get();
654 return DeleteRuntimeState(((NPL_STATE*)pRuntime_state)->shared_from_this());
661 return m_runtime_state_main.get();
687 virtual void SetCompressionKey(
const byte* sKey=0,
int nSize=0,
int nUsePlainTextEncoding = 0){};
697 virtual int GetCompressionLevel(){
return 0;};
704 virtual int GetCompressionThreshold(){
return 0;};
732 virtual bool IsKeepAliveEnabled(){
return false;};
741 virtual bool IsIdleTimeoutEnabled(){
return false;};
745 virtual int GetIdleTimeoutPeriod(){
return false;};
779 virtual void GetIP(
const char* nid,
char* pOutput){};
787 virtual void accept(
const char* tid,
const char* nid = NULL){};
793 virtual void reject(
const char* nid,
int nReason = 0){};
851 virtual void AsyncDownload(
const char* url,
const char* destFolder,
const char* callbackScript,
const char* DownloaderName){};
865 virtual int Download(
const char* url,
const char* destFolder,
const char* callbackScript,
const char* DownloaderName){
return 0;};
945 if(sNeuronFile == NULL)
947 return (
int)NPL::NPL_FailedToLoadFile;
950 NPLFileName FullName(sNeuronFile);
953 if(pRuntimeState == 0)
956 return m_runtime_state_main->Activate_async(FullName.
sRelativePath,
code, nLength);
960 if(FullName.
sNID.empty())
982 return (
int)NPL::NPL_Error;
995 NPLRuntimeState_ptr runtimestate = GetRuntimeState(name);
996 if(runtimestate.get() == 0)
998 runtimestate.reset(
new NPL_STATE(name.c_str()));
999 runtimestate->Init();
1001 m_runtime_states.insert(runtimestate);
1004 m_active_state_map[name] = runtimestate;
1006 return runtimestate;
1016 return m_runtime_state_main;
1019 std::map<string, NPLRuntimeState_ptr>::iterator iter = m_active_state_map.find(name);
1021 if( iter != m_active_state_map.end())
1023 return iter->second;
1025 return NPLRuntimeState_ptr();
1031 NPLRuntimeState_ptr runtimestate = GetRuntimeState(name);
1032 if(runtimestate.get() == 0)
1035 runtimestate = CreateRuntimeState(name, type_);
1037 return runtimestate;
1044 if(runtime_state.get() == 0)
1047 NPLRuntime_Pool_Type::iterator iter = m_runtime_states.find(runtime_state);
1048 if(iter != m_runtime_states.end())
1050 m_runtime_states.erase(iter);
1053 if( ! runtime_state->GetName().empty() )
1055 m_active_state_map.erase(runtime_state->GetName());
1062 return m_runtime_state_main;
1081 #pragma endregion CNPLMiniRuntime virtual void NPL_GetChannelProperty(int channel_ID, int *priority, int *reliability)
see also NPL_SetChannelProperty
Definition: NPLMiniRuntime.hpp:929
virtual const std::string & GetName() const
return the name of this runtime state.
Definition: NPLMiniRuntime.hpp:317
virtual void AddPublicFile(const std::string &filename, int nID)
add a nID, filename pair to the public file list.
Definition: NPLMiniRuntime.hpp:766
NPLRuntimeState_ptr GetMainRuntimeState()
get the default (main) runtime state.
Definition: NPLMiniRuntime.hpp:1061
virtual void WriteLog(const char *text, int nTextLen=0, int nLogType=0)
write a log message
Definition: NPLMiniRuntime.hpp:381
virtual bool SetTimer(int nIDEvent, float fElapse, const char *sNeuronFile)
creates a timer with the specified time-out value [thread safe]
Definition: NPLMiniRuntime.hpp:400
int m_type
message type
Definition: NPLMiniRuntime.hpp:75
virtual void NPL_ResetChannelProperties()
reset all 16 predefined channel properties.
Definition: NPLMiniRuntime.hpp:921
virtual void StartNetServer(const char *server=NULL, const char *port=NULL)
start the NPL net server's io_service loop.
Definition: NPLMiniRuntime.hpp:753
virtual void accept(const char *tid, const char *nid=NULL)
accept a given connection.
Definition: NPLMiniRuntime.hpp:787
virtual NPL::INPLRuntimeState * CreateGetState(const char *name, NPL::NPLRuntimeStateType type_=NPL::NPLRuntimeStateType_NPL)
it get runtime state first, if none exist, it will create one and add it to the main threaded state ...
Definition: NPLMiniRuntime.hpp:645
virtual void StopNetServer()
stop the net server
Definition: NPLMiniRuntime.hpp:756
virtual NPL::INPLRuntimeState * CreateState(const char *name, NPL::NPLRuntimeStateType type_=NPL::NPLRuntimeStateType_NPL)
create a new runtime state.
Definition: NPLMiniRuntime.hpp:629
INPLRuntimeState interface for DLL interface.
Definition: INPLRuntimeState.h:27
virtual NPL::INPLRuntimeState * GetState(const char *name=NULL)
get a runtime state with an explicit name.
Definition: NPLMiniRuntime.hpp:637
bool DeleteRuntimeState(NPLRuntimeState_ptr runtime_state)
create a given runtime state.
Definition: NPLMiniRuntime.hpp:1042
NPLFileNameT(const char *filename)
create the NPL file name object from a string.
Definition: NPLMiniRuntime.hpp:121
virtual bool IsTCPKeepAliveEnabled()
whether SO_KEEPALIVE is enabled.
Definition: NPLMiniRuntime.hpp:725
StringType sRuntimeStateName
the runtime state name that the file belongs to.
Definition: NPLMiniRuntime.hpp:90
NPLRuntimeState_ptr GetRuntimeState(const std::string &name)
get a runtime state with an explicit name.
Definition: NPLMiniRuntime.hpp:1013
virtual void SetKeepAlive(bool bEnable)
enable application level keep alive.
Definition: NPLMiniRuntime.hpp:731
simple scoped lock function
Definition: Mutex.hpp:14
Definition: NPLInterface.hpp:43
URL request can be a HTTP get/post request etc.
Definition: NPLNetClient.h:45
std::string m_sCode
the pure data code.
Definition: NPLMiniRuntime.hpp:72
construct this to ensure matching calls to SetCurrentMessage().
Definition: NPLMiniRuntime.hpp:301
virtual void Run(bool bToEnd=true)
call this function regularly in the main game thread to process packages.
Definition: NPLMiniRuntime.hpp:586
StringType sRelativePath
the relative file path of the NPL file in the Runtime's file system.
Definition: NPLMiniRuntime.hpp:100
virtual void SetIdleTimeoutPeriod(int nMilliseconds)
how many milliseconds of inactivity to assume this connection should be timed out.
Definition: NPLMiniRuntime.hpp:744
NPLRuntime_Pool_Type m_runtime_states
all NPL runtime states in the NPL runtime
Definition: NPLMiniRuntime.hpp:1070
virtual bool DeleteState(NPL::INPLRuntimeState *pRuntime_state)
create a given runtime state.
Definition: NPLMiniRuntime.hpp:651
virtual int Activate(NPL::INPLRuntimeState *pRuntimeState, const char *sNeuronFile, const char *code=NULL, int nLength=0, int channel=0, int priority=2, int reliability=3)
activate the specified file.
Definition: NPLMiniRuntime.hpp:944
Definition: class.hpp:124
virtual NPL::NPLReturnCode SendMessage(NPL::NPLMessage_ptr &msg, int priority=0)
send a message to the current message queue.
Definition: NPLMiniRuntime.hpp:365
virtual void EnableIdleTimeout(bool bEnable)
Enable idle timeout.
Definition: NPLMiniRuntime.hpp:740
virtual int NPL_GetDefaultChannel()
Get the default channel ID, default value is 0.
Definition: NPLMiniRuntime.hpp:887
NPLFileHandlerMap_t m_file_handlers_map
file handlers map.
Definition: NPLMiniRuntime.hpp:519
virtual int GetCurrentMsgLength()
get length of the current message
Definition: NPLMiniRuntime.hpp:371
NPLRuntimeState_ptr CreateRuntimeState(const std::string &name, NPL::NPLRuntimeStateType type_=NPL::NPLRuntimeStateType_NPL)
create a new runtime state.
Definition: NPLMiniRuntime.hpp:993
virtual void ClearPublicFiles()
clear all public files, so that the NPL server will be completely private.
Definition: NPLMiniRuntime.hpp:771
virtual void RegisterFile(const char *sFilename, NPL::INPLActivationFile *pFileHandler=NULL)
function to register the a file handler in the current NPL state, so that it is callable from NPL scr...
Definition: NPLMiniRuntime.hpp:427
the default NPL runtime state, with all NPL and ParaEngine functions loaded. it will consume about 1M...
Definition: INPLRuntimeState.h:15
NPL interface of a Jabber-XMPP client proxy.
Definition: IParaWebService.h:108
virtual void GetIP(const char *nid, char *pOutput)
get the ip address of given NPL connection.
Definition: NPLMiniRuntime.hpp:779
virtual bool AddToMainThread(NPL::INPLRuntimeState *runtime_state)
add a given runtime state to the main game thread.
Definition: NPLMiniRuntime.hpp:667
virtual void NPL_SetDefaultChannel(int channel_ID)
Set the default channel ID, default value is 0.
Definition: NPLMiniRuntime.hpp:882
virtual void NPL_AddDNSRecord(const char *sDNSName, const char *sAddress)
add a DNS server record to the current NPL runtime.
Definition: NPLMiniRuntime.hpp:876
a globally unique name of a NPL file name instance.
Definition: NPLMiniRuntime.hpp:84
cross platform condition variable.
Definition: Semaphore.hpp:21
virtual void Cleanup()
clean up the NPL runtime environment
Definition: NPLMiniRuntime.hpp:608
virtual void Init()
initialize NPL runtime environment
Definition: NPLMiniRuntime.hpp:572
virtual bool ChangeTimer(int nIDEvent, int dueTime, int period)
Changes the start time and the interval between method invocations for a timer, using 32-bit signed i...
Definition: NPLMiniRuntime.hpp:421
virtual int Process()
process all queued message.
Definition: NPLMiniRuntime.hpp:433
virtual bool ChangeRequestPoolSize(const char *sPoolName, int nCount)
There is generally no limit to the number of requests sent.
Definition: NPLMiniRuntime.hpp:837
from the NPL activate function call. the second paramter to LibActivate() will be pointer of INPLRunt...
Definition: PEtypes.h:230
StringType sDNSServerName
the DNS file name.
Definition: NPLMiniRuntime.hpp:105
cross platform mutex
Definition: Mutex.hpp:88
virtual void AsyncDownload(const char *url, const char *destFolder, const char *callbackScript, const char *DownloaderName)
Asynchronously download a file from the url.
Definition: NPLMiniRuntime.hpp:851
virtual ParaEngine::INPLJabberClient * CreateJabberClient(const char *sJID)
Create a new jabber client instance with the given jabber client ID.
Definition: NPLMiniRuntime.hpp:812
void FromString(const char *sFilePath)
reset from string
Definition: NPLMiniRuntime.hpp:179
compare functions for runtime state ptr
Definition: NPLMiniRuntime.hpp:556
virtual void SetCompressionLevel(int nLevel)
Set the zlib compression level to use in case compression is enabled.
Definition: NPLMiniRuntime.hpp:696
virtual void reject(const char *nid, int nReason=0)
reject and close a given connection.
Definition: NPLMiniRuntime.hpp:793
virtual NPL::INPLRuntime * GetNPLRuntime()
get the NPL runtime environment
Definition: NPLMiniRuntime.hpp:374
virtual ParaEngine::INPLJabberClient * GetJabberClient(const char *sJID)
get an existing jabber client instance interface by its JID.
Definition: NPLMiniRuntime.hpp:807
virtual void CancelDownload(const char *DownloaderName)
cancel all asynchronous downloads that matches a certain downloader name pattern
Definition: NPLMiniRuntime.hpp:858
virtual int Download(const char *url, const char *destFolder, const char *callbackScript, const char *DownloaderName)
Synchronous call of the function AsyncDownload().
Definition: NPLMiniRuntime.hpp:865
Definition: inftrees.h:24
virtual void SetTCPKeepAlive(bool bEnable)
System level Enable/disable SO_KEEPALIVE.
Definition: NPLMiniRuntime.hpp:720
void SetRelativePath(const char *sPath, int nCount=-1)
set the relaive_Path
Definition: NPLMiniRuntime.hpp:129
virtual NPLReturnCode Activate_async(const std::string &filepath, const char *code=NULL, int nLength=0, int priority=0)=0
activate the specified file in this runtime state.
const char * m_current_msg
pointer to the current message.
Definition: NPLMiniRuntime.hpp:503
StringType sNID
the NPL runtime server ID that the file belongs to.
Definition: NPLMiniRuntime.hpp:96
virtual bool AppendURLRequest(ParaEngine::CURLRequestTask *pUrlTask, const char *sPoolName=NULL)
Append URL request to a pool.
Definition: NPLMiniRuntime.hpp:831
virtual NPL::NPLReturnCode ActivateLocal(const char *filepath, const char *code=NULL, int nLength=0, int priority=0)
same as Activate_async, except that it is a short cut name.
Definition: NPLMiniRuntime.hpp:345
std::string m_sFilename
the target filename.
Definition: NPLMiniRuntime.hpp:69
Definition: INPLAcitvationFile.h:18
virtual void NPL_SetChannelProperty(int channel_ID, int priority, int reliability)
Messages can be sent via predefined channels.
Definition: NPLMiniRuntime.hpp:907
NPLRuntimeState_ptr CreateGetRuntimeState(const std::string &name, NPL::NPLRuntimeStateType type_=NPL::NPLRuntimeStateType_NPL)
it get runtime state first, if none exist, it will create one and add it to the main threaded state ...
Definition: NPLMiniRuntime.hpp:1029
virtual const char * GetCurrentMsg()
get a pointer to the current message
Definition: NPLMiniRuntime.hpp:368
virtual bool KillTimer(int nIDEvent)
Destroys the specified timer [thread safe].
Definition: NPLMiniRuntime.hpp:409
int ProcessMsg(const NPLMiniMessage &msg)
process a single message.
Definition: NPLMiniRuntime.hpp:480
NPLRuntime_Temp_Pool_Type m_temp_rts_pool
temporary run time states queue
Definition: NPLMiniRuntime.hpp:1073
NPLMiniMessageQueue_t m_input_queue
the input message queue
Definition: NPLMiniRuntime.hpp:516
std::string ToString()
convert to string of the following format [(sRuntimeStateName|gl)][sNID:]sRelativePath[] ...
Definition: NPLMiniRuntime.hpp:150
virtual void SetHostMainStatesInFrameMove(bool bHostMainStatesInFrameMove)
whether we will process messages in the main threads in the frame move function.
Definition: NPLMiniRuntime.hpp:621
NPLRuntimeState_ptr m_runtime_state_main
the default (main) NPL runtime state.
Definition: NPLMiniRuntime.hpp:1067
virtual NPL::NPLReturnCode Activate_async(const std::string &filepath, const char *code=NULL, int nLength=0, int priority=0)
activate the specified file in this runtime state.
Definition: NPLMiniRuntime.hpp:340
virtual void SetCompressionKey(const byte *sKey=0, int nSize=0, int nUsePlainTextEncoding=0)
set the compression method of incoming the outgoing messages.
Definition: NPLMiniRuntime.hpp:687
virtual void call(const char *sNPLFilename, const char *sCode, int nCodeLength=0)
synchronous function call
Definition: NPLMiniRuntime.hpp:430
virtual void SetUseCompression(bool bCompressIncoming, bool bCompressOutgoing)
whether to use compression on transport layer for incoming and outgoing connections ...
Definition: NPLMiniRuntime.hpp:673
NPL Runtime Environment interface.
Definition: INPLRuntime.h:30
bool RegisterFileHandler(const char *filename, const NPLFileActivateHandlerCallback_t &fileCallback)
if USE_BOOST_SIGNAL_FILE_HANDLER is defined, we will allow multiple file handlers to subscribe to the...
Definition: NPLMiniRuntime.hpp:452
int m_current_msg_length
length of the current message.
Definition: NPLMiniRuntime.hpp:506
std::string m_name
the name of this runtime state.
Definition: NPLMiniRuntime.hpp:509
virtual int activate(const char *sNPLFilename, const char *sCode, int nCodeLength=0, int priority=2, int reliability=4)
activate the specified file.
Definition: NPLMiniRuntime.hpp:322
virtual NPL::INPLRuntimeState * GetMainState()
get the default (main) runtime state.
Definition: NPLMiniRuntime.hpp:660
int m_processed_msg_count
for stats
Definition: NPLMiniRuntime.hpp:522
virtual bool CloseJabberClient(const char *sJID)
close a given jabber client instance.
Definition: NPLMiniRuntime.hpp:819
For full featured NPL runtime, one need to use NPL::CNPLRuntime.
Definition: NPLMiniRuntime.hpp:549
One can usually implement one or more methods to make it a standalone runtime state.
Definition: NPLMiniRuntime.hpp:273
NPL mini message is used by mini runtime internally.
Definition: NPLMiniRuntime.hpp:49
NPLRuntimeStateType
The types of CNPLRuntimeState.
Definition: INPLRuntimeState.h:12
virtual void SetCompressionThreshold(int nThreshold)
set the default compression threshold for all connections on this machine.
Definition: NPLMiniRuntime.hpp:703
virtual NPL::NPLReturnCode Activate_async(NPL::NPLMessage_ptr &msg, int priority=0)
same as Activate_async.
Definition: NPLMiniRuntime.hpp:355
std::map< std::string, NPLRuntimeState_ptr > m_active_state_map
a mapping from the runtime state name to runtime state instance pointer
Definition: NPLMiniRuntime.hpp:1076