#import "EventCallbackProtocol.h"
#import "ExampleInterface.h"
#import "MessageReceiveCallbackProtocol.h"
#import "LogCallbackProtocol.h"
#import <mach/clock.h>
#import <mach/mach.h>
#import "ParameterInterface.h"
#import <pthread.h>
@interface Example : NSObject <MessageReceiveCallbackProtocol,
EventCallbackProtocol, LogCallbackProtocol>
#define COMMON_MY_SAMPLE_TOPIC "my/sample/topic"
#define COMMON_SEMP_TOPIC_FORMAT "#SEMP/%s/SHOW"
#define COMMON_ATTACHMENT_TEXT "my attached data"
#define DEFAULT_THREAD_RETURN_ARG (NULL)
#define _NULL_THREAD_ID (0)
typedef void *(*FP)(void *);
typedef void *threadRetType;
typedef threadRetType (*threadFn_pt)(void *param_p);
typedef struct callbackBridge {
void *example_p;
void *user_p;
} callbackBridge_t;
typedef struct contextThreadInfo {
volatile int contextThreadStarted;
volatile int stopContextThread;
int rc;
pthread_t handle;
} contextThreadInfo_t;
typedef struct threadInfo {
volatile int threadStarted;
volatile int stopThread;
int rc;
pthread_t handle;
void *user_p;
} threadInfo_t;
@property NSString *name;
@property (copy, atomic)NSString *description;
@property ParameterInterface *parameters;
@property ExampleInterface *exampleInterface;
@property BOOL running;
@property BOOL requestRun;
@property BOOL requestCancel;
@property callbackBridge_t *nullBridge_p;
- (id)initWithExampleInterface:(ExampleInterface *)exampleInterface;
- (void)start;
- (void)run;
- (void)cancel;
- (void)cleanup;
- (void)printToTextView:(NSString *)str;
- (void)logCCSMPVersion;
- (void)setLoggingLevel;
errorString:(const char *)errorStr;
messageCallback:
eventCallback_p;
messageCallback:
eventCallback_p
userData:(callbackBridge_t *)user_p;
topic:(char *)topic_p
deliveryMode:(solClient_uint32_t)deliveryMode;
- (pthread_t)startThreadWithFP:(FP)fp argument:(void *)arg;
- (void)waitOnThread:(pthread_t)handle;
- (threadRetType)contextThread:(void *)contextInfo_p;
threadRetType contextThread(void *user_p);
- (int)startContextThread:(contextThreadInfo_t *)info_p;
- (void)stopContextThread:(contextThreadInfo_t *)info_p;
- (UInt64)getTimeInUs;
- (void)getUsageTimeWithUserTime:(long long *)userTime_p
systemTime:(long long *)systemTime_p;
@end