| DH |
| 1 | /* * Copyright (c) 2011-2012, fortiss GmbH. * Licensed under the Apache License, Version 2.0. * * Use, modification and distribution are subject to the terms specified * in the accompanying license file LICENSE.txt located at the root directory * of this software distribution. A copy is available at * http://chromosome.fortiss.org/. * * This file is part of CHROMOSOME. * * $Id: dataHandlerTypes.h 2366 2013-02-08 16:10:06Z camek $ */ |
| 2 | /** * \file * Data Handler Types. */ |
| 3 | #ifndef XME_CORE_DATAHANDLER_DATAHANDLERTYPES_H #define XME_CORE_DATAHANDLER_DATAHANDLERTYPES_H |
| 4 | //******************************************************************************// //*** Includes ***// //******************************************************************************// #include "xme/core/component.h" #include "xme/xme_opt.h" #include "xme/hal/linkedList.h" |
| 5 | #include <stdbool.h> #include <stdint.h> |
| 6 | //******************************************************************************// //*** Defines ***// //******************************************************************************// |
| 7 | //******************************************************************************// //*** Type definitions ***// //******************************************************************************// |
| 8 | /** * \typedef xme_core_dataHandler_dataHandle_t * * \brief Defines the type for the database structure. */ typedef struct xme_core_dataHandle_dataHandle xme_core_dataHandler_dataHandle_t; |
| 9 | /** * \typedef xme_core_dataHandler_dataHandle_t * * \brief Defines the type for the database structure. */ typedef struct dataHandler_dataElement { xme_core_component_port_t port; xme_core_topic_t topic; size_t size; void * data; } dataHandler_dataElement_t; |
| 10 | /** * \typedef xme_core_dataHandler_dataHandle_t * * \brief Defines the type for the database structure. */ typedef struct dataHandler_attributeElement { size_t size; xme_core_attribute_key_t key; void * data; } dataHandler_attributeElement_t; |
| 11 | // TODO: we could use linkedList or we can use hash table. It's also interesting to use a self organizing linked list! /** * \typedef dataHandler_dataStructure_t * * \brief Defines the internal data structure of one database element. * * Description of flags: * - rteInternalUseOnly: * - lockedByTestSystem: True, if Testsystem has written data into the shadow-port (only used in shadow database). * However, the entry maybe not be activated yet. * - useShadowEntry: True, if shadow-port is activated (only used in internal database). */ typedef struct dataHandler_dataStructure { bool rteInternalUseOnly; bool lockedByTestSystem; bool useShadowEntry; xme_core_component_port_t port; xme_core_component_portType_t type; xme_core_topic_t topic; uint8_t shadowActivationLength; uint32_t startShadowCycle; uint16_t attributeElements; dataHandler_dataElement_t dataElement; dataHandler_attributeElement_t * attributeElement; } dataHandler_dataStructure_t; |
| 12 | /** * \typedef internals_t * * \brief Defines the internal settings of the database. * * Description of flags: * - useShadowEntries: True, if the whole shadow database is active * - initFromFileStorage: * - correctInitialized: * - alreadyInitalized: * - selftestDone: True, if self-test during startup has been finished, system is now in normal operation */ typedef struct dataHandler_internal { bool useShadowEntries; bool initFromFileStorage; bool correctInitialized; bool alreadyInitalized; bool selftestDone; xme_core_component_t selfID; uint32_t portId; uint8_t shadowActivationLength; uint32_t startShadowCycle; } internals_t; |
| 13 | /** * \typedef imageDataStructure_t * * \brief Pointer to the database image file, which was written in a former run of our database. */ typedef void * imageDataStructure_t; |
| 14 | /** * \typedef dataHandlerSelfTest_dataStructure_t * \brief Type for phases. */ typedef dataHandler_dataStructure_t shadow_dataStructure_t; typedef dataHandler_dataStructure_t dataHandlerSelfTest_dataStructure_t; typedef dataHandler_dataStructure_t shadowSelfTest_dataStructure_t; |
| 15 | typedef struct { xme_core_component_t componentID; xme_core_component_portType_t type; xme_core_topic_t topic; int bufferSize; xme_core_attribute_descriptor_list_t metadata; int queueSize; bool overwrite; bool persistent; int historyDepth; bool rteInteral; } dataHandlerSetup_t; |
| 16 | //******************************************************************************// //*** Prototypes ***// //******************************************************************************// XME_EXTERN_C_BEGIN |
| 17 | /** * \var dataHandlerInternals * \brief describes internal states of the data handler. */ extern internals_t dataHandlerInternals; |
| 18 | /*FIXME: Bug #2253*/ /** * \var dataHandlerTable * \brief contains all data values given during createPort given by components */ typedef XME_HAL_SINGLYLINKEDLIST(dataHandler_dataStructure_t, dataHandlerTable_t, XME_CORE_DATAHANDLER_DATAHANDLERTABLE_SIZE); extern dataHandlerTable_t dataHandlerTable; |
| 19 | /** * \var shadowTable * \brief contains all data values used by the test system */ typedef XME_HAL_SINGLYLINKEDLIST(shadow_dataStructure_t, shadowTable_t, XME_CORE_DATAHANDLER_DATAHANDLERTABLE_SIZE); extern shadowTable_t shadowTable; |
| 20 | /** * \var dataHandlerTableSelfTest * \brief contains all data values given during createPort at selftest stage. */ typedef XME_HAL_SINGLYLINKEDLIST(dataHandlerSelfTest_dataStructure_t, dataHandlerTableSelfTest_t, XME_CORE_DATAHANDLER_DATAHANDLERSELFTESTTABLE_SIZE); extern dataHandlerTableSelfTest_t dataHandlerTableSelfTest; |
| 21 | /** * \var shadowTableSelfTest * \brief contains all data values used by the test system at selftest stage. */ typedef XME_HAL_SINGLYLINKEDLIST(shadowSelfTest_dataStructure_t, shadowTableSelfTest_t, XME_CORE_DATAHANDLER_DATAHANDLERSELFTESTTABLE_SIZE); extern shadowTableSelfTest_t shadowTableSelfTest; |
| 22 | XME_EXTERN_C_END |
| 23 | #endif // #ifndef XME_CORE_DATAHANDLER_DATAHANDLERTYPES_H |
| 24 | /* * Copyright (c) 2011-2012, fortiss GmbH. * Licensed under the Apache License, Version 2.0. * * Use, modification and distribution are subject to the terms specified * in the accompanying license file LICENSE.txt located at the root directory * of this software distribution. A copy is available at * http://chromosome.fortiss.org/. * * This file is part of CHROMOSOME. * * $Id: dataHandlerInternalMethods.h 2366 2013-02-08 16:10:06Z camek $ */ |
| 25 | /** * \file * Data Handler Types. */ |
| 26 | #ifndef XME_CORE_DATAHANDLER_DATAHANDLERINTERNALMETHODS_H #define XME_CORE_DATAHANDLER_DATAHANDLERINTERNALMETHODS_H |
| 27 | //******************************************************************************// //*** Includes ***// //******************************************************************************// |
| 28 | //******************************************************************************// //*** Defines ***// //******************************************************************************// |
| 29 | //******************************************************************************// //*** Type definitions ***// //******************************************************************************// |
| 30 | //******************************************************************************// //*** Prototypes ***// //******************************************************************************// XME_EXTERN_C_BEGIN |
| 31 | /** * \brief Creates date entry in the data store and the shadow store. * \param[in] value describes all parameters to create the data entry element. * \param[out] port is the given port handle, which identifies the data element or 0 if failed * to create the data entry. * \return Returns one of the following status codes: * - XME_CORE_STATUS_SUCCESS if data structure was correct created. * - XME_CORE_STATUS_INTERNAL_ERROR * - XME_CORE_STATUS_INVALID_PARAMETER */ extern xme_core_status_t createDataEntry ( dataHandlerSetup_t const * const value, xme_core_component_port_t * const port ); |
| 32 | /** * \brief Reads data from a port into the given buffer. This is the internal version of \a xme_core_dataHandler_readData. * For parameters and details please \sa xme_core_dataHandler_readData. */ extern xme_core_status_t readData ( xme_core_component_port_t port, void * const buffer, unsigned int bufferSize, unsigned int * const bytesRead, bool readFromShadow ); |
| 33 | /** * \brief Reads attribute from a port into the given buffer. This is the internal version of \a xme_core_dataHandler_readAllAttributes. * For parameters and details please \sa xme_core_dataHandler_readAllAttributes. */ extern xme_core_status_t readAllAttributes ( xme_core_component_port_t port, void * const buffer, unsigned int bufferSize, unsigned int * const bytesRead, bool readFromShadow ); |
| 34 | /** *\brief Reads attributes from a port into the given buffer. This is the internal version of \a xme_core_dataHandler_readAttribute. * For parameters and details please \sa xme_core_dataHandler_readAttribute. */ extern xme_core_status_t readAttribute ( xme_core_component_port_t port, xme_core_attribute_key_t attributeKey, void * const buffer, unsigned int bufferSize, unsigned int * const bytesRead, bool readFromShadow ); |
| 35 | /** *\brief Write data to a port from the given buffer. This is the internal version of \a xme_core_dataHandler_writeData. * For parameters and details please \sa xme_core_dataHandler_writeData. */ extern xme_core_status_t writeData ( xme_core_component_port_t port, void const * const buffer, unsigned int bufferSize, bool writeToShadow ); |
| 36 | /** *\brief Writes attributes to a port from the given buffer. This is the internal version of \a xme_core_dataHandler_writeAttribute. * For parameters and details please \sa xme_core_dataHandler_writeAttribute. */ extern xme_core_status_t writeAttribute ( xme_core_component_port_t port, xme_core_attribute_key_t attributeKey, void const * const buffer, unsigned int bufferSize, bool writeToShadow ); |
| 37 | /** * \brief Initializes the internal information used to organize the database or the queue */ extern void initializeInternalDataStructure(void); |
| 38 | /** * \brief Initializes the data handler from a given file image. This image was stored during runtime, * in order to allow later a reload of data handler layout. Additionally, the image will be * generated when the finalization of the data handler will be invoked. * \param image describes the image file which shall be loaded. * \return Returns one of the following status codes: * - XME_CORE_STATUS_SUCCESS if data structure was correct initialized. * - XME_CORE_STATUS_INTERNAL_ERROR * - XME_CORE_STATUS_INVALID_PARAMETER */ extern xme_core_status_t initializeDataStructure(imageDataStructure_t image); |
| 39 | /** * \brief When a image shall be loaded it will be checked if it is correct and the data it contains * is valid. If all these checks are correct, then the loaded structure will be used * as a data handler instance. * \param image describes the image file which shall be checked. * \return Returns one of the following status codes: * - XME_CORE_STATUS_SUCCESS if image is valid. * - XME_CORE_STATUS_INTERNAL_ERROR * - XME_CORE_STATUS_INVALID_PARAMETER */ extern xme_core_status_t checkImageForConsistancy(imageDataStructure_t image); |
| 40 | /** * \brief This functions checks whether the internal structure is a valid one or not. * \return Returns one of the following status codes: * - XME_CORE_STATUS_SUCCESS if internal structure is valid. * - XME_CORE_STATUS_INTERNAL_ERROR * - XME_CORE_STATUS_INVALID_PARAMETER */ extern xme_core_status_t checkInternalConistency(void); |
| 41 | /** * \brief This function searches in the given data structure layout for a given element. * \param[in] port is the identifier returned by the database or queue. * \return the matching data structure element or NULL */ extern dataHandler_dataStructure_t * findPortInInternalDataStructure ( xme_core_component_port_t port ); |
| 42 | /** * \brief This function searches in the shadow data structure layout for a given element. * \param[in] port is the identifier returned by the database or queue. * \return the matching data structure element or NULL */ extern dataHandler_dataStructure_t * findPortInShadowDataStructure ( xme_core_component_port_t port ); |
| 43 | #if 0 extern dataHandler_attributeElement_t * findKeyInInternalDataStructure ( dataHandler_dataStructure_t *element, xme_core_attribute_key_t attributeKey ); #endif |
| 44 | /** * \brief This function checks if a persistent storage contains an image of the data handler * \return Returns one of the following status codes: * - XME_CORE_STATUS_SUCCESS if an image exists. * - XME_CORE_STATUS_INTERNAL_ERROR * - XME_CORE_STATUS_INVALID_PARAMETER */ extern xme_core_status_t checkDataStorageForImage(void); |
| 45 | /** * \brief This function reads a data image from disk. * \return the parsed image if it was correct parsed otherwise NULL */ extern imageDataStructure_t loadImage(void); |
| 46 | /** * \brief This function checks if a port is valid. * \param[in] the current used port. * \return Returns one of the following status codes: * - XME_CORE_STATUS_SUCCESS if port is valid. * - XME_CORE_STATUS_INTERNAL_ERROR */ extern inline xme_core_status_t checkPort(xme_core_component_port_t port); |
| 47 | /** * \brief This function calculates the perfect size. * \param[in] first defines the first size * \param[in] second defines the second size * \return the smallest size of both. */ extern inline size_t getSize(size_t first, size_t second); |
| 48 | XME_EXTERN_C_END |
| 49 | #endif /* XME_CORE_DATAHANDLER_DATAHANDLERINTERNALMETHODS_H */ |
| 50 | /* * Copyright (c) 2011-2012, fortiss GmbH. * Licensed under the Apache License, Version 2.0. * * Use, modification and distribution are subject to the terms specified * in the accompanying license file LICENSE.txt located at the root directory * of this software distribution. A copy is available at * http://chromosome.fortiss.org/. * * This file is part of CHROMOSOME. * * $Id: dataHandler.h 2340 2013-02-06 09:52:18Z becker $ */ |
| 51 | /** * \file * Data Handler. */ |
| 52 | #ifndef XME_CORE_DATAHANDLER_DATAHANDLER_H #define XME_CORE_DATAHANDLER_DATAHANDLER_H |
| 53 | //******************************************************************************// //*** Includes ***// //******************************************************************************// #include "xme/core/component.h" |
| 54 | //******************************************************************************// //*** Static variables ***// //******************************************************************************// XME_EXTERN_C_BEGIN |
| 55 | extern xme_core_attribute_descriptor_list_t XME_CORE_NO_ATTRIBUTE; |
| 56 | XME_EXTERN_C_END |
| 57 | //******************************************************************************// //*** Prototypes ***// //******************************************************************************// XME_EXTERN_C_BEGIN |
| 58 | /** * \brief Creates a port for a component. Exactly one port of this type will be present. * With this command memory is allocated in the database or for queues. * The memory is accessible only by the component and port to which it is associated. * The memory contains all given informations, which allows the database to organize this. * Beside, not only the topic, but also the corresponding attributes are stored. * * \param componentID contains the global unique identifier of a component, which tries to allocate * memory in the database or queues. * \param type contains the communication type of the port, which can be as follows: * - XME_CORE_COMPONENT_PORTTYPE_INVALID * - XME_CORE_COMPONENT_PORTTYPE_DCC_PUBLICATION * - XME_CORE_COMPONENT_PORTTYPE_DCC_SUBSCRIPTION * - XME_CORE_COMPONENT_PORTTYPE_RR_REQUEST_SENDER * - XME_CORE_COMPONENT_PORTTYPE_RR_REQUEST_HANDLER * - XME_CORE_COMPONENT_PORTTYPE_RR_RESPONSE_SENDER * - XME_CORE_COMPONENT_PORTTYPE_RR_RESPONSE_HANDLER * \param topic is the global unique identifier of the data element matching a topic. * \param bufferSize specifies how big the allocated memory should be. * \param metadata contains a list of all topic related attributes. * \param queueSize gives the dataHandler the information how many items shall be stored, when * queues are used. This parameter is unused when topics are stored in a database. * \param overwrite indicates if port data should be overwritten when new values arrive. * \param persistent indicates if data of a port is stored persistent. This means that the data will * not change during runtime. * \param historyDepth specifies how many data items are stored in the port. This allows to store old * data item whether from former time slots if a time triggered system will be used or * from previous occurred interrupts if an event triggered system will be used. * \param portHandle is the identifier returned by the database or queue. This allows a component to * read or write data from the allocated memory by using the dataHandler API. * * \return Returns one of the following status codes: * - XME_CORE_STATUS_SUCCESS if the port has been successfully * initialized. * - XME_CORE_STATUS_INVALID_CONFIGURATION if a component of this * type has already been initialized. Exactly one component of this * type must be present on every node. */ extern xme_core_status_t xme_core_dataHandler_createPort ( xme_core_component_t componentID, xme_core_component_portType_t type, xme_core_topic_t topic, int bufferSize, xme_core_attribute_descriptor_list_t metadata, int queueSize, bool overwrite, bool persistent, int historyDepth, xme_core_component_port_t * const portHandle ); |
| 59 | // only used by the broker |
| 60 | /** * \brief Transfers one topic from one port to another port. * The source port must be a publisher and the sink port will then be a subscriber. * \param portSource provides the handle to identify the source memory allocated in the database. * \param portSink specifies the handle of the destination memory in the database, where the data * given by portSource will be copied to. * \return Returns one of the following status codes: * - XME_CORE_STATUS_SUCCESS if the transfer was done correct. * - XME_CORE_STATUS_INVALID_CONFIGURATION if a component of this * type has already been initialized. Exactly one component of this * type must be present on every node. */ extern xme_core_status_t xme_core_dataHandler_transferData ( xme_core_component_port_t portSource, xme_core_component_port_t portSink ); |
| 61 | /** * \brief Initializes the database. * \return Returns one of the following status codes: * - XME_CORE_STATUS_SUCCESS if the database has been successfully * initialized. * - XME_CORE_STATUS_INTERNAL_ERROR if the database got an error during initialization. */ extern xme_core_status_t xme_core_dataHandler_init(void); |
| 62 | /** * \brief Shuts down the database. * \return Returns one of the following status codes: * - XME_CORE_STATUS_SUCCESS if the shutdown has been successfully done. * - XME_CORE_STATUS_INTERNAL_ERROR if an error occurred. */ extern xme_core_status_t xme_core_dataHandler_fini(void); |
| 63 | /** * \brief Reads data from a port into the given buffer. * \param port specifies the handle for an allocated memory in the database or queue. * The memory contains the data which shall be read. * \param buffer is a user provided storage, to which the data is copied. * \param bufferSize specifies the size of the provided storage. * It can be bigger, equal, or smaller than the data element stored in the * database or queue. * \param bytesRead indicates how much data was copied. If the \a bufferSize is bigger or equal, * then the maximum amount of the stored memory will be returned. If the given \a bufferSize * is smaller then at least the given bufferSize will be returned. * \return Returns one of the following status codes: * - XME_CORE_STATUS_SUCCESS if a correct read was done. * - XME_CORE_STATUS_PERMISSION_DENIED if given port is a Publication-Port * - XME_CORE_STATUS_INTERNAL_ERROR in case of any other error */ extern xme_core_status_t xme_core_dataHandler_readData ( xme_core_component_port_t port, void * const buffer, unsigned int bufferSize, unsigned int * const bytesRead ); |
| 64 | /** * \brief Reads all attributes of a given topic from a port into the given buffer. * \param port specifies the handle for an allocated memory in the database or queue. * The memory contains the data which shall be read. * \param buffer is a user provided storage, to which the data is copied. * \param bufferSize specifies the size of the provided storage. * It can be bigger, equal, or smaller than the data element stored in the * database or queue. * \param bytesRead indicates how much data was copied. If the \a bufferSize is bigger or equal, * then the maximum amount of the stored memory will be returned. If the given \a bufferSize * is smaller then at least the given bufferSize will be returned. * \return Returns one of the following status codes: * - XME_CORE_STATUS_SUCCESS if a correct read was done. * - XME_CORE_STATUS_PERMISSION_DENIED if given port is a Publication-Port * - XME_CORE_STATUS_INTERNAL_ERROR in case of any other error */ extern xme_core_status_t xme_core_dataHandler_readAllAttributes ( xme_core_component_port_t port, void * const buffer, unsigned int bufferSize, unsigned int * const bytesRead ); |
| 65 | /** * \brief Reads an attribute given by the attribute key to the given buffer. * \param port is the identifier returned by the database or queue. * \param attributeKey identifies which attribute of a given topic shall be read. * \param buffer is a user provided storage, to which the data is copied. * \param bufferSize specifies the size of the provided storage. * It can be bigger, equal, or smaller than the data element stored in the * database or queue. * \param bytesRead indicates how much data was copied. If the \a bufferSize is bigger or equal, * then the maximum amount of the stored memory will be returned. If the given \a bufferSize * is smaller then at least the given bufferSize will be returned. * \return Returns one of the following status codes: * - XME_CORE_STATUS_SUCCESS if a correct read was done. * - XME_CORE_STATUS_PERMISSION_DENIED if given port is a Publication-Port * - XME_CORE_STATUS_INTERNAL_ERROR in case of any other error */ extern xme_core_status_t xme_core_dataHandler_readAttribute ( xme_core_component_port_t port, xme_core_attribute_key_t attributeKey, void * const buffer, unsigned int bufferSize, unsigned int * const bytesRead ); |
| 66 | /** * \brief Writes data to a port. Data is provided by a user's buffer. * \param port is the identifier returned by the database or queue. * \param buffer is a user provided storage, from which the data is copied. * \param bufferSize specifies the size of the provided storage. * It indicates how much data shall be copied to the database or queue. * \return Returns one of the following status codes: * - XME_CORE_STATUS_SUCCESS if a correct write was done. * - XME_CORE_STATUS_PERMISSION_DENIED if given port is a Subscription-Port * - XME_CORE_STATUS_INTERNAL_ERROR in case of any other error */ extern xme_core_status_t xme_core_dataHandler_writeData ( xme_core_component_port_t port, void * const buffer, unsigned int bufferSize ); |
| 67 | /** * * \return */ /** * \brief Writes an attribute given by the attribute key to the port. Data is provided by a user's buffer. * \param port is the identifier returned by the database or queue. * \param attributeKey identifies to which attribute of a given topic data should be written. * \param buffer is a user provided storage, from which the data is copied. * \param bufferSize specifies the size of the provided storage. * It indicates how much data shall be copied to the database or queue. * \return Returns one of the following status codes: * - XME_CORE_STATUS_SUCCESS if a correct write was done. * - XME_CORE_STATUS_PERMISSION_DENIED if given port is a Subscription-Port * - XME_CORE_STATUS_INTERNAL_ERROR in case of any other error */ extern xme_core_status_t xme_core_dataHandler_writeAttribute ( xme_core_component_port_t port, xme_core_attribute_key_t attributeKey, void * const buffer, unsigned int bufferSize ); |
| 68 | /** * \brief Prepares the input port. * \param port is the identifier returned by the database or queue. * \return Returns one of the following status codes: * - XME_CORE_STATUS_SUCCESS if a correct read was done. * - XME_CORE_STATUS_INTERNAL_ERROR * - XME_CORE_STATUS_INVALID_PARAMETER */ extern xme_core_status_t xme_core_dataHandler_prepareInputPort(xme_core_component_port_t port); |
| 69 | /** * \brief Prepares the output port. * \param port is the identifier returned by the database or queue. * \return Returns one of the following status codes: * - XME_CORE_STATUS_SUCCESS if a correct read was done. * - XME_CORE_STATUS_INTERNAL_ERROR * - XME_CORE_STATUS_INVALID_PARAMETER */ extern xme_core_status_t xme_core_dataHandler_prepareOutputPort(xme_core_component_port_t port); |
| 70 | XME_EXTERN_C_END |
| 71 | #endif // #ifndef XME_CORE_DATAHANDLER_DATAHANDLER_H |
| 72 | /* * Copyright (c) 2011-2012, fortiss GmbH. * Licensed under the Apache License, Version 2.0. * * Use, modification and distribution are subject to the terms specified * in the accompanying license file LICENSE.txt located at the root directory * of this software distribution. A copy is available at * http://chromosome.fortiss.org/. * * This file is part of CHROMOSOME. * * $Id: dataHandlerRTEInterface.h 2220 2013-01-22 16:13:07Z camek $ */ |
| 73 | /** * \file * Data Handler. */ |
| 74 | #ifndef XME_CORE_DATAHANDLER_RTE_INTERFACE_H #define XME_CORE_DATAHANDLER_RTE_INTERFACE_H |
| 75 | //******************************************************************************// //*** Includes ***// //******************************************************************************// #include <stdbool.h> |
| 76 | //******************************************************************************// //*** Static variables ***// //******************************************************************************// |
| 77 | //******************************************************************************// //*** Prototypes ***// //******************************************************************************// XME_EXTERN_C_BEGIN |
| 78 | // FIXME: How shall we add infos about accessing RTE components to this specific topic. extern xme_core_status_t xme_core_dataHandler_createRTEData ( xme_core_topic_t topic, int bufferSize, xme_core_attribute_descriptor_list_t metadata, int queueSize, bool overwrite, bool persistent, int historyDepth, xme_core_component_port_t * const portHandle ); |
| 79 | XME_EXTERN_C_END |
| 80 | #endif /* XME_CORE_DATAHANDLER_RTE_INTERFACE_H */ |
| 81 | /* * Copyright (c) 2011-2012, fortiss GmbH. * Licensed under the Apache License, Version 2.0. * * Use, modification and distribution are subject to the terms specified * in the accompanying license file LICENSE.txt located at the root directory * of this software distribution. A copy is available at * http://chromosome.fortiss.org/. * * This file is part of CHROMOSOME. * * $Id: dataHandlerConfigurationInterface.h 2162 2013-01-17 12:17:04Z camek $ */ |
| 82 | /** * \file * Data Handler. */ |
| 83 | #ifndef XME_CORE_DATAHANDLER_DATAHANDLER_CONFIGURATION_INTERFACE_H #define XME_CORE_DATAHANDLER_DATAHANDLER_CONFIGURATION_INTERFACE_H |
| 84 | //******************************************************************************// //*** Includes ***// //******************************************************************************// #include <stdbool.h> |
| 85 | #include "xme/core/core.h" #include "xme/core/component.h" #include "xme/core/topic.h" |
| 86 | //******************************************************************************// //*** Type definitions ***// //******************************************************************************// |
| 87 | //******************************************************************************// //*** Prototypes ***// //******************************************************************************// XME_EXTERN_C_BEGIN /** */ extern xme_core_status_t xme_core_dataHandler_dataPacketFeasible(xme_core_topic_t topic, xme_core_dataHandler_memoryLocation_t location, unsigned int queueSize, xme_core_attr_listHandle_t metaData, bool overwrite, xme_core_dataManager_dataPacketId packet, bool persistent, unsigned int historyDepth, xme_core_directory_transactionId_t transactionId); |
| 88 | XME_EXTERN_C_END |
| 89 | #endif // #ifndef XME_CORE_DATAHANDLER_DATAHANDLER_CONFIGURATION_INTERFACE_H |
| 90 | /* * Copyright (c) 2011-2012, fortiss GmbH. * Licensed under the Apache License, Version 2.0. * * Use, modification and distribution are subject to the terms specified * in the accompanying license file LICENSE.txt located at the root directory * of this software distribution. A copy is available at * http://chromosome.fortiss.org/. * * This file is part of CHROMOSOME. * * $Id: dataHandlerTransactionInterface.h 2162 2013-01-17 12:17:04Z camek $ */ |
| 91 | /** * \file * Data Handler. */ |
| 92 | #ifndef XME_CORE_DATAHANDLER_DATAHANDLER_TRANSACTION_INTERFACE_H #define XME_CORE_DATAHANDLER_DATAHANDLER_TRANSACTION_INTERFACE_H |
| 93 | //******************************************************************************// //*** Includes ***// //******************************************************************************// #include <stdbool.h> |
| 94 | #include "xme/core/core.h" #include "xme/core/component.h" #include "xme/core/topic.h" |
| 95 | //******************************************************************************// //*** Type definitions ***// //******************************************************************************// |
| 96 | //******************************************************************************// //*** Prototypes ***// //******************************************************************************// XME_EXTERN_C_BEGIN |
| 97 | extern xme_core_status_t xme_core_dataHandler_confirmTransaction(xme_core_directory_transactionId_t transactionId); |
| 98 | extern xme_core_status_t xme_core_dataHandler_rollbackTransaction(xme_core_directory_transactionId_t transactionId); |
| 99 | XME_EXTERN_C_END |
| 100 | #endif // #ifndef XME_CORE_DATAHANDLER_DATAHANDLER_TRANSACTION_INTERFACE_H |
Комментарии