each neuron file that is activated will have a CNeuronFileState structure kept.
More...
#include <NeuronFileState.h>
|
| CNeuronFileState (const std::string &filename) |
|
bool | IsProcessing () const |
| whether the message is still being processed in the activation function. More...
|
|
void | SetProcessing (bool val) |
|
bool | PushMessage (NPLMessage_ptr &msg) |
|
bool | PopMessage (NPLMessage_ptr &msg) |
| Pop a message. More...
|
|
bool | GetMessage (NPLMessage_ptr &msg) |
| get the message without removing it from the stack
|
|
bool | IsEmpty () |
| if message queue is empty. More...
|
|
void | ClearMessage () |
| clear all messages
|
|
bool | PopClearState () |
|
void | Tick (int nFrameMoveId) |
| increase internal tick counter for activation. More...
|
|
int | GetTick (int nFrameMoveId) |
| get tick count for current frame. More...
|
|
int32 | GetMaxQueueSize () const |
| max number of messages in the pending message queue. More...
|
|
void | SetMaxQueueSize (int32 val) |
|
const std::string & | GetFilename () const |
| neuron file name
|
|
bool | IsPreemptive () |
| Preemptive multi-tasking is simulated by counting instructions. More...
|
|
int32 | GetPreemptiveInstructionCount () const |
| if not 0, we will use coroutine and debug hook to simulate preemptive scheduling in user mode. More...
|
|
void | SetPreemptiveInstructionCount (int32 val) |
|
each neuron file that is activated will have a CNeuronFileState structure kept.
This class is only used by the local NPL thread, so no lock is needed.
§ GetMaxQueueSize()
int32 NPL::CNeuronFileState::GetMaxQueueSize |
( |
| ) |
const |
max number of messages in the pending message queue.
Any new incoming messages will be dropped. By default its size is same as parent NPL thread's message queue size
§ GetPreemptiveInstructionCount()
int32 NPL::CNeuronFileState::GetPreemptiveInstructionCount |
( |
| ) |
const |
if not 0, we will use coroutine and debug hook to simulate preemptive scheduling in user mode.
§ GetTick()
int NPL::CNeuronFileState::GetTick |
( |
int |
nFrameMoveId | ) |
|
get tick count for current frame.
- Parameters
-
nFrameMoveId | parent NPL thread's frame move id |
§ IsEmpty()
bool NPL::CNeuronFileState::IsEmpty |
( |
| ) |
|
if message queue is empty.
§ IsPreemptive()
bool NPL::CNeuronFileState::IsPreemptive |
( |
| ) |
|
Preemptive multi-tasking is simulated by counting instructions.
§ IsProcessing()
bool NPL::CNeuronFileState::IsProcessing |
( |
| ) |
const |
whether the message is still being processed in the activation function.
some activation will set this flag to true in case their processing is cross multiple NPL time slice (tick).
§ PopMessage()
bool NPL::CNeuronFileState::PopMessage |
( |
NPLMessage_ptr & |
msg | ) |
|
Pop a message.
- Returns
- true if succeed or false if queue is empty.
§ PushMessage()
bool NPL::CNeuronFileState::PushMessage |
( |
NPLMessage_ptr & |
msg | ) |
|
- Returns
- true if succeed, or false if queue is full.
§ Tick()
void NPL::CNeuronFileState::Tick |
( |
int |
nFrameMoveId | ) |
|
increase internal tick counter for activation.
- Parameters
-
nFrameMoveId | parent NPL thread's frame move id |
§ m_isProcessing
bool NPL::CNeuronFileState::m_isProcessing |
|
protected |
whether the message is still being processed in the activation function.
some activation will set this flag to true in case their processing is cross multiple NPL time slice (tick).
§ m_nActivationThisTick
int32 NPL::CNeuronFileState::m_nActivationThisTick |
|
protected |
total number of activation calls in this/last tick.
§ m_nMaxQueueSize
int32 NPL::CNeuronFileState::m_nMaxQueueSize |
|
protected |
max number of messages in the pending message queue.
Any new incoming messages will be dropped. By default its size is same as parent NPL thread's message queue size
§ m_nPreemptiveInstructionCount
int32 NPL::CNeuronFileState::m_nPreemptiveInstructionCount |
|
protected |
if not 0, we will use coroutine and debug hook to simulate preemptive scheduling in user mode.
§ m_nTotalActivations
int32 NPL::CNeuronFileState::m_nTotalActivations |
|
protected |
total number of activations since program starts.
The documentation for this class was generated from the following files:
- Client/trunk/ParaEngineClient/NPL/NeuronFileState.h
- Client/trunk/ParaEngineClient/NPL/NeuronFileState.cpp