Recommendation for Space Data System Practices


TRANSFER BUFFER Operation



Download 2.26 Mb.
Page27/35
Date31.07.2017
Size2.26 Mb.
#24990
1   ...   23   24   25   26   27   28   29   30   ...   35

        1. TRANSFER BUFFER Operation

Name ISLE_TransferBuffer

GUID {7B425725-D32D-11d2-9B44-00A0246D80DB}

Inheritance: IUnknown – ISLE_Operation

File ISLE_TransferBuffer.H

Synopsis

#include


#define IID_ISLE_TransferBuffer_DEF { 0x7b425725, 0xd32d, 0x11d2, \

{ 0x9b, 0x44, 0x0, 0xa0, 0x24, 0x6d, 0x80, 0xdb } }


interface ISLE_TransferBuffer : ISLE_Operation

{

virtual size_t



Get_MaximumSize() const = 0;

virtual HRESULT

Set_MaximumSize( size_t size ) = 0;

virtual size_t

Get_Size() const = 0;

virtual bool

Full() const = 0;

virtual bool

Empty() const = 0;

virtual void

Append( ISLE_Operation* poperation ) = 0;

virtual void

Prepend( ISLE_Operation* poperation,

bool extend = false ) = 0;

virtual ISLE_Operation*

RemoveFront() = 0;

virtual ISLE_Operation*

RemoveRear() = 0;

virtual const ISLE_Operation*

Front() const = 0;

virtual void

Clear() = 0;

virtual void

Reset() = 0;

virtual bool

MoreData() const = 0;

virtual const ISLE_Operation*

Next() = 0;

};

Methods

size_t Get_MaximumSize() const;

Returns the maximum number of elements that can be stored into the buffer.



HRESULT Set_MaximumSize( size_t size );

Sets the maximum number of elements that can be stored into the buffer. If the current size exceeds the requested maximum size returns an error.



Result codes

S_OK the maximum size has been set as requested

E_FAIL the maximum size has not been set because it would require deletion of stored objects

size_t Get_Size() const;

Returns the number of elements currently stored in the buffer.



bool Full() const;

Returns true if the number of stored elements equals the maximum number that can be stored.



bool Empty() const;

Returns true if nothing is stored in the buffer.



void Append( ISLE_Operation* poperation );

Appends the operation object to the end of the buffer. The operation object will be deleted by the buffer when it itself is deleted.



Preconditions: The buffer is not full and the operation object is of the correct type.

void Prepend( ISLE_Operation* poperation, bool extend = false );

Inserts the operation object at the front of the buffer. If the argument ‘extend’ is set to true, the buffer is extended if it is already full and the maximum size is adjusted.



Preconditions: The buffer is not full or the argument ‘extend’ is set to true; the operation object is of the correct type.

ISLE_Operation* RemoveFront();

Returns the operation object at the beginning of the buffer and removes it from the buffer. If the buffer is empty returns NULL.



ISLE_Operation* RemoveRear();

Returns the operation object at the end of the buffer and removes it from the buffer. If the buffer is empty returns NULL.



const ISLE_Operation* Front() const;

Returns a pointer to the first object in the buffer, without changing the buffer content.



void Clear();

Remove and delete all stored objects.



Iterating through the transfer buffer.

The following methods define a simple iterator for the transfer buffer. Iteration is always from the first to the last element stored.



void Reset();

Resets the iterator to the beginning of the buffer.



bool MoreData() const;

Returns true if more objects are stored in the buffer; i.e., the next call to Next() will return an object. If the iterator has reached the end of the buffer, returns false.



const ISLE_Operation* Next();

Returns the object at the position of the iterator and advances the iterator by one.

Code Example for iteration through the buffer (pbuf is a pointer to the buffer):

const ISLE_Operation* poperation = 0;

pbuf->Reset();

while ( buf->MoreData() ) {

poperation = buf->Next();

// do something with the object

}

Default Setting of Operation Parameters after Creation


Argument

Created directly

maximum buffer size

1

current size

0

Checking of Invocation Parameters

No checks are defined.



                    1. Interfaces Provided by Several Components

      1. Control of Interface BEHAVIOR

        1. Sequential Flows of Control

Name ISLE_Sequential

GUID {D020B008-CCD1-11d2-9B44-00A0246D80DB}

Inheritance: IUnknown

File ISLE_Sequential.H

The interface is used to control processing of a component providing the behavior ‘Sequential Flows of Control’ as defined in 3.7.2.

Processing of the component is started with the method StartSequential() and stopped by TerminateSequential(). StartSequential() returns as soon as processing of the component has started.

The event monitor (interface ISLE_EventMonitor) is used by the component to register events on which the component implementing this interface will wait. The timer handler (interface ISLE_TimerHandler) is used by the component to start timers and register a timeout processor to be called when the timer expires.



Synopsis

#include

#include

interface ISLE_EventMonitor;

interface ISLE_TimerHandler;
#define IID_ISLE_Sequential_DEF { 0xd020b008, 0xccd1, 0x11d2, \

{ 0x9b, 0x44, 0x0, 0xa0, 0x24, 0x6d, 0x80, 0xdb } }


interface ISLE_Sequential : IUnknown

{

virtual HRESULT



StartSequential( ISLE_EventMonitor* pmonitor,

ISLE_TimerHandler* ptimerhandler ) = 0;

virtual HRESULT

TerminateSequential() = 0;

};

Methods

HRESULT StartSequential( ISLE_EventMonitor* pmonitor,
ISLE_TimerHandler* ptimerhandler );

Starts processing of the component.



Arguments

pmonitor reference to the event monitor the component shall use for monitoring external events

ptimerhandler reference to the timer handler the component shall use

Result codes

S_OK processing of the component has started

SLE_E_DEGRADED not all of the proxies linked to the service element could be started (applies only for the service element)

SLE_E_CONFIG configuration has not been performed or has not completed successfully

E_INVALIDARG either the event monitor or the timer handler are missing

SLE_E_STATE operation of the component has already been started

E_FAIL operation could not be started because of any other problem

HRESULT TerminateSequential();

Terminates processing of the component.



Result codes

S_OK processing of the component will terminate

SLE_E_STATE operation of the component has not been started

        1. Event Monitor

Name ISLE_EventMonitor

GUID {D020B009-CCD1-11d2-9B44-00A0246D80DB}

Inheritance: IUnknown

File ISLE_EventMonitor.H

Objects implementing this interface provide the means to register and de-register external events, which the object will monitor. When an event is detected, the object will call the method ProcessEvent() of the interface ISLE_EventProcessor passed as argument to the event registration method. If, for any reason the object is no longer able to monitor an event, it calls the method MonitorAbort() of the event processor.



Synopsis

#include

#include

interface ISLE_EventProcessor;


#define IID_ISLE_EventMonitor_DEF { 0xd020b009, 0xccd1, 0x11d2, \

{ 0x9b, 0x44, 0x0, 0xa0, 0x24, 0x6d, 0x80, 0xdb } }


interface ISLE_EventMonitor : IUnknown

{

virtual HRESULT



AddEvent( const SLE_EventHandle& handle,

ISLE_EventProcessor* pprocessor ) = 0;

virtual HRESULT

RemoveEvent( const SLE_EventHandle& handle ) = 0;

};

Methods

HRESULT AddEvent( const SLE_EventHandle& handle,
ISLE_EventProcessor* pprocessor );

Registers the event identified by the event handle and the event processor that will process the event.



Arguments

handle the event handle, describing the event according to platform specific conventions

pprocessor pointer to the interface of the event processor that shall be invoked when the event is detected

Result codes

S_OK the event has been registered

SLE_E_OVERFLOW the number of registered events exceeds the capabilities of the event monitor

SLE_E_DUPLICATE the event is already registered

E_FAIL the request fails because of a further unspecified error

HRESULT RemoveEvent( const SLE_EventHandle& handle );

Removes a previously registered event and its event handler from the event monitor.



Arguments

handle the event handle, describing the event according to platform specific conventions

Result codes

S_OK the event has been de-registered

SLE_E_UNKNOWN the event is not registered

        1. Event Processor

Name ISLE_EventProcessor

GUID {D020B00A-CCD1-11d2-9B44-00A0246D80DB}

Inheritance: IUnknown

File ISLE_EventProcessor.H

The event processor handles an event detected by the event monitor with which it has been registered.



Synopsis

#include

#include
#define IID_ISLE_EventProcessor_DEF { 0xd020b00a, 0xccd1, 0x11d2, \

{ 0x9b, 0x44, 0x0, 0xa0, 0x24, 0x6d, 0x80, 0xdb } }


interface ISLE_EventProcessor : IUnknown

{

virtual void



ProcessEvent( const SLE_EventHandle& handle ) = 0;

virtual void

MonitorAbort( const SLE_EventHandle& handle ) = 0;

};

Methods



void ProcessEvent( const SLE_EventHandle& handle );

Processes the event passed as argument.



Arguments

handle the event handle describing the event that has occurred

void MonitorAbort( const SLE_EventHandle& handle );

The method is called when the event handler is no longer able to monitor the event.



Arguments

handle the event handle that had been registered

        1. Timer Handler

Name ISLE_TimerHandler

GUID {0E265180-D4BF-11d2-9B44-00A0246D80DB}

Inheritance: IUnknown

File ISLE_TimerHandler.H

Objects implementing this interface provide the means to start a timer and register a timeout processor. When the timer expires, the method ProcessTimeout() of the timeout processor is called. The interface also provides a method to cancel a running timer and to restart a timer that is already running. If for any reason the timer handler aborts a running timer by itself it calls the method HandlerAbort() of the timeout processor.

A running timer is identified by a timer identifier. This is an opaque type, with which the client must not associate any specific meaning. A specific identifier is only valid as long as the associated timer is running.

As an option, an invocation identifier can be associated with every activation of a timer. This invocation identifier is passed to the matching call of the method ProcessTimeout() of the timeout processor.



Synopsis

#include

#include

interface ISLE_TimeoutProcessor;

#define IID_ISLE_TimerHandler_DEF { 0xe265180, 0xd4bf, 0x11d2, \

{ 0x9b, 0x44, 0x0, 0xa0, 0x24, 0x6d, 0x80, 0xdb } };


interface ISLE_TimerHandler : IUnknown

{

virtual HRESULT



StartTimer( int timeout,

ISLE_TimeoutProcessor* pprocessor,

SLE_TimerId& timer,

int invocationId = 0 ) = 0;

virtual HRESULT

CancelTimer( SLE_TimerId timer ) = 0;

virtual HRESULT

RestartTimer( SLE_TimerId timer,

int timeout,

int invocationId = 0 ) = 0;

};

Methods

HRESULT StartTimer( int timeout,
ISLE_TimeoutProcessor* pprocessor,
SLE_TimerId& timer,
int invocationId );

Starts a timer and registers a timeout processor to be called when the timer expires.



Arguments

timeout the timeout value in seconds

pprocessor pointer to the interface of the timeout processor that shall be invoked when the timer expires

timer the identifier for the timer returned to the caller

invocationId identifier of the timer activation passed to the matching call of the timeout processor

Result codes

S_OK the timer has been started

SLE_E_OVERFLOW the number of timers exceeds the capabilities of the timer handler

SLE_E_TIME the time specified cannot be handled

E_FAIL the request fails because of a further unspecified error

HRESULT CancelTimer( SLE_TimerId timer );

Cancels a previously started timer.



Arguments

timer the timer id returned from the call to StartTimer()

Result codes

S_OK the timer has been cancelled

SLE_E_UNKNOWN the timer is not running

HRESULT RestartTimer( SLE_TimerId timer, int timeout,
int invocationId );

Cancels and subsequently starts the timer identified in the first argument. Returns an error if the timer is not active.



Arguments

timer the timer id returned from the call to StartTimer()

timeout the timeout value in seconds

invocationId identifier of the timer activation passed to the matching call of the timeout processor

Result codes

S_OK the timer has been restarted

SLE_E_UNKNOWN the timer is not active

SLE_E_TIME the time specified cannot be handled

E_FAIL the request fails because of a further unspecified reason

        1. Timeout Processor

Name ISLE_TimeoutProcessor

GUID {0E265181-D4BF-11d2-9B44-00A0246D80DB}

Inheritance: IUnknown

File ISLE_TimeoutProcessor.H

The timeout processor is called when a timer expires.



Synopsis

#include

#include
#define IID_ISLE_TimeoutProcessor_DEF { 0xe265181, 0xd4bf, 0x11d2, \

{ 0x9b, 0x44, 0x0, 0xa0, 0x24, 0x6d, 0x80, 0xdb } };


interface ISLE_TimeoutProcessor : IUnknown

{

virtual void



ProcessTimeout( SLE_TimerId timer,

int invocationId ) = 0;

virtual void

HandlerAbort( SLE_TimerId timer ) = 0;

};

Methods

void ProcessTimeout( SLE_TimerId timer, int invocationId );

Processes a timeout.



Arguments

timer the timer id returned when the timer was started

invocationId identifier of the timer activation passed to the call of the interface ISLE_TimerHandler, which caused this method invocation

void HandlerAbort( SLE_TimerId timer );

The method is called when the timer handler has aborted the timer for whatever reason.



Arguments

timer the timer id returned when the timer was started

        1. Concurrent Flows of Control

Name ISLE_Concurrent

GUID {7B425726-D32D-11d2-9B44-00A0246D80DB}

Inheritance: IUnknown

File ISLE_Concurrent.H

The interface is used to control processing of a component providing the behavior ‘Concurrent Flows of Control’ as defined in 3.7.3.

Processing of the component is started with the method StartConcurent(). The method checks the configuration and returns as soon as processing within the component has been started.

Synopsis

#include


#define IID_ISLE_Concurrent_DEF { 0x7b425726, 0xd32d, 0x11d2, \

{ 0x9b, 0x44, 0x0, 0xa0, 0x24, 0x6d, 0x80, 0xdb } }


interface ISLE_Concurrent : IUnknown

{

virtual HRESULT



StartConcurrent() = 0;

virtual HRESULT

TerminateConcurrent() = 0;

};

Methods



HRESULT StartConcurrent();

Starts processing of the component.



Result codes

S_OK processing of the component has started

SLE_E_DEGRADED not all of the proxies linked to the service element could be started (applies only for the service element)

SLE_E_CONFIG configuration has not been performed or has not completed successfully

SLE_E_STATE operation of the component has already been started

E_FAIL operation could not be started because of any other problem

HRESULT TerminateConcurrent();

Terminates processing of the component.



Result codes

S_OK processing of the component will terminate

SLE_E_STATE operation of the component has not been started

      1. Control of Traces

Name ISLE_TraceControl

GUID {D020B00B-CCD1-11d2-9B44-00A0246D80DB}

Inheritance: IUnknown

File ISLE_TraceControl.H

The interface is exported by objects that support generation of diagnostic traces. Trace records are entered to the interface ISLE_Trace passed to the method StartTrace(). This interface is provided by the SLE Application. Trace records and the trace levels are specified in 3.6.3.



Synopsis

#include

#include

interface ISLE_Trace;


#define IID_ISLE_TraceControl_DEF { 0xd020b00b, 0xccd1, 0x11d2, \

{ 0x9b, 0x44, 0x0, 0xa0, 0x24, 0x6d, 0x80, 0xdb } }


interface ISLE_TraceControl : IUnknown

{

virtual HRESULT



StartTrace( ISLE_Trace* trace,

SLE_TraceLevel level,

bool forward ) = 0;

virtual HRESULT

StopTrace() = 0;

};

Methods



HRESULT StartTrace( ISLE_Trace* ptrace,
SLE_TraceLevel level,
bool forward );

Starts tracing by the object that exports the interface. If the argument forward is set to true, the object also starts tracing of associated lower layers of the API, if applicable.



Arguments

ptrace pointer to the interface to which trace records shall be passed

level the trace level that shall be applied as defined in 3.6.3

forward if set to true, tracing for lower layers of the API shall be started as well

Result codes

S_OK tracing started

SLE_E_STATE tracing already active

E_FAIL the request fails because of a further unspecified error

HRESULT StopTrace();

Stops a previously started trace.



Result codes

S_OK tracing stopped

SLE_E_STATE tracing not active

                    1. SLE API Proxy

      1. Component Creator Function

File .H

The API proxy component includes a function to create an instance and obtain a pointer to the administrative interface. The signature of this function is defined as:

extern "C" HRESULT

_CreateProxy( const GUID& iid,

void** ppv );

where is replaced by the product identifier of the implementation. External ‘C’ linkage is required. The function ensures that a single instance of the proxy is created and returns pointer to the same instance if it is called repetitively. The function checks the argument identifying the interface and returns an error when the implementation does not support an interface with that identifier.

Arguments

iid identifier of the required interface

ppv pointer to the requested interface of the API proxy

Result codes

S_OK the object has been created

E_NOINTERFACE the specified interface is not supported


      1. SLE Proxy Administrative Interface

Name ISLE_ProxyAdmin

GUID {D020B00C-CCD1-11d2-9B44-00A0246D80DB}


Directory: sec -> docs -> 201510 Documents for SC13 Submission
sec -> Security Education Narrative Database Patterns of Professional Education
sec -> Guidelines for implementation of Prime Minister’s New 15 Point Programme for the Welfare of Minorities
sec -> Morphodynamics of a Constructed Marsh: Project Greenshores, Pensacola, Florida
sec -> Registration 6: 00pm – 6: 10pm Welcome/Opening Remarks
sec -> ¡bienvenidos! Welcome to Puerto Rico! 2 Things to know immediately upon arrival 2
sec -> Cadillac Racing cts-v coupe Media Kit
sec -> Sure Bet Narrative Nonfiction Suggestions
sec -> Executive Board of the United Nations Development Programme, the United Nations Population Fund and the United Nations Office for Project Services
201510 Documents for SC13 Submission -> Recommendation for Space Data System Practices

Download 2.26 Mb.

Share with your friends:
1   ...   23   24   25   26   27   28   29   30   ...   35




The database is protected by copyright ©ininet.org 2024
send message

    Main page