SmartSoft Component-Developer API
Classes | Typedefs | Enumerations | Functions
Smart Namespace Reference

Classes

struct  EventInputType
 struct used by IEventHandler and IEventClientPattern internally More...
 
class  IActiveQueryServerHandler
 
class  IActiveQueueInputHandlerDecorator
 
class  IClientPattern
 This is the base class for all client-patterns implementing a connection-oriented communication. More...
 
class  ICommunicationObject
 This is the base-class for all communication-objects. More...
 
class  ICommunicationPattern
 This is the base class for all communication-patterns. More...
 
class  IComponent
 Component management class. More...
 
class  ICorrelationId
 This pure virtual interface can be implemented using middleware-specific features to correlate e.g. More...
 
class  IEventClientPattern
 Handles the event service on client side. More...
 
class  IEventHandler
 Handler class to process fired events asynchronously at the client. More...
 
class  IEventServerPattern
 
class  IEventTestHandler
 Condition Test Handler (decides at server whether event fires or not). More...
 
class  IInputHandler
 This template class implements the Observer part of the Observer design pattern for implementing a generic data-input-handler (i.e. More...
 
class  IManagedTask
 
class  InputSubject
 This template class implements the Subject (also called Model) part of the Observer design pattern for implementing delegation of handling incoming data. More...
 
class  InputTaskTrigger
 
class  IPushClientPattern
 Client part of the Push pattern to provide a flexible publish/subscribe service. More...
 
class  IPushServerPattern
 Server part of the Push pattern to provide a push service. More...
 
class  IQueryClientPattern
 The client part of Query pattern to perform two-way (request-response) communication. More...
 
class  IQueryServerHandler
 Handler Class for QueryServer for incoming requests. More...
 
class  IQueryServerPattern
 The server part of the Query pattern to perform two-way (request-response) communication. More...
 
class  ISendClientPattern
 Client part of the one-way, n->1 Send communication pattern. More...
 
class  ISendServerHandler
 Handler Class for SendServer for incoming commands. More...
 
class  ISendServerPattern
 Server part of the one-way, n->1 Send communication pattern. More...
 
class  IServerPattern
 This is the base class for all server-patterns. More...
 
class  IShutdownObserver
 This class implements the Observer part of the Observer design pattern for implementing a uniform shutdown procedure for all component's resources. More...
 
class  ITask
 Encapsulates a user-level thread. More...
 
class  ITaskInteractionObserver
 
class  ITimerHandler
 
class  ITimerManager
 
class  IUniversalId
 A template class providing an interface for a universal identifier. More...
 
class  NumericCorrelationId
 A simple ID realization using a size_t type internally. More...
 
class  PrescaleManager
 This helper class allows dividing an update frequency by a given factor. More...
 
class  QueryServerTaskTrigger
 
class  ShutdownSubject
 This class implements the Subject (also called Model) part of the Observer design pattern for implementing a uniform shutdown procedure for all component's resources. More...
 
class  TaskInteractionSubject
 
class  TaskTriggerObserver
 
class  TaskTriggerSubject
 
class  TimedTaskTrigger
 

Typedefs

using Clock = std::chrono::steady_clock
 
using Duration = Clock::duration
 
using TimePoint = Clock::time_point
 
using CorrelationIdPtr = std::shared_ptr< ICorrelationId >
 
using EventIdPtr = CorrelationIdPtr
 
using QueryIdPtr = CorrelationIdPtr
 

Enumerations

enum  EventMode { single, continuous }
 Mode of event. More...
 
enum  QueryStatus { QUERY_PENDING = 0, QUERY_VALIDANSWER = 1, QUERY_DISCONNECTED = 2, QUERY_WRONGID = 3 }
 QueryStatus. More...
 
enum  StatusCode {
  SMART_OK = 0, SMART_NODATA, SMART_CANCELLED, SMART_UNSUBSCRIBED,
  SMART_WRONGID, SMART_UNKNOWNSTATE, SMART_NOTACTIVATED, SMART_ACTIVATED,
  SMART_NOTALLOWED, SMART_ACTIVE, SMART_PASSIVE, SMART_DISCONNECTED,
  SMART_INCOMPATIBLESERVICE, SMART_PORTALREADYUSED, SMART_UNKNOWNPORT, SMART_SERVICEUNAVAILABLE,
  SMART_UNKNOWNCOMPONENT, SMART_TIMEOUT, SMART_STATUS = 256, SMART_ERROR = 512,
  SMART_ERROR_COMMUNICATION, SMART_ERROR_UNKNOWN, SMART_ERROR_FATAL
}
 Status Code. More...
 

Functions

std::string QueryStatusString (QueryStatus qs)
 global function used to convert a QueryStatus into ASCII representation. More...
 
std::string StatusCodeConversion (const StatusCode &code)
 global function used to convert StatusCode into ASCII representation. More...
 
std::ostream & operator<< (std::ostream &os, const StatusCode &status)
 ostream operator for StatusCode More...
 

Typedef Documentation

◆ Clock

using Smart::Clock = typedef std::chrono::steady_clock

◆ CorrelationIdPtr

using Smart::CorrelationIdPtr = typedef std::shared_ptr<ICorrelationId>

◆ Duration

using Smart::Duration = typedef Clock::duration

◆ EventIdPtr

◆ QueryIdPtr

◆ TimePoint

using Smart::TimePoint = typedef Clock::time_point

Enumeration Type Documentation

◆ EventMode

Mode of event.

Enumerator
single 

fire event only once.

continuous 

event fires whenever the condition is met.

◆ QueryStatus

QueryStatus.

QueryStatus used to communicate the current QueryStatus from a QueryServer to a QueryClient for each individual query-request. A query-request can be either still pending if no answer has been yet calculated. If an answer for a specific query-request has been calculated by the QueryServer but this answer has not yet been fetched by the requesting QueryClient then this query-request is marked validanswer. A query-request can become invalidated if the QueryClient disconnects in the meantime.

Enumerator
QUERY_PENDING 

this indicates a pending query-request (i.e. not yet answered/consumed query-requests)

QUERY_VALIDANSWER 

this indicates a calculated answer that has not yet been consumed

QUERY_DISCONNECTED 

this indicates a query-request that became invalid due to a closed connection

QUERY_WRONGID 

this indicates a wrong id of a query-request (i.e. a request that does no longer exists)

◆ StatusCode

Status Code.

SmartSoft so far doesn't use exceptions generally, only in constructors. It uses return values for status & error handling of methods (see communication pattern classes for more details).

Enumerator
SMART_OK 

Operation completed successfully.

SMART_NODATA 

no new data is available (yet) e.g. in PushClient

SMART_CANCELLED 

some blocking wait has been cancelled

SMART_UNSUBSCRIBED 

e.g. used for Push subscription state

SMART_WRONGID 

e.g. used for QueryId(s)

SMART_UNKNOWNSTATE 

e.g. used by StatePattern

SMART_NOTACTIVATED 

indicates deactivated service

SMART_ACTIVATED 

indicates activated service

SMART_NOTALLOWED 

generic not-allowed status code (with context-specific meaning)

SMART_ACTIVE 
SMART_PASSIVE 
SMART_DISCONNECTED 

used to indicate client disconnected state

SMART_INCOMPATIBLESERVICE 

used to indicate incompatible service during client connection

SMART_PORTALREADYUSED 

used to indicate duplicate port usage (with the same server+service name)

SMART_UNKNOWNPORT 

used to indicate unknown ports

SMART_SERVICEUNAVAILABLE 

used to indicate unknown service-names

SMART_UNKNOWNCOMPONENT 

used to indicate unknown component names

SMART_TIMEOUT 

generic timeout status code

SMART_STATUS 

value=256 (all enumeration values <= SMART_STATUS indicate regular status codes)

SMART_ERROR 

value=512 (all enumeration values >= SMART_ERROR indicate errors)

SMART_ERROR_COMMUNICATION 

generic communication error code

SMART_ERROR_UNKNOWN 

generic error code for unspecified errors

SMART_ERROR_FATAL 

something went badly wrong

Function Documentation

◆ operator<<()

std::ostream& Smart::operator<< ( std::ostream &  os,
const StatusCode status 
)
inline

ostream operator for StatusCode

This operator prints a string representation of the StatusCode to ostream.

◆ QueryStatusString()

std::string Smart::QueryStatusString ( QueryStatus  qs)
inline

global function used to convert a QueryStatus into ASCII representation.

Parameters
qsQueryStatus

◆ StatusCodeConversion()

std::string Smart::StatusCodeConversion ( const StatusCode code)
inline

global function used to convert StatusCode into ASCII representation.

Parameters
codeStatusCode