2 * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 ///////////////////////////////////////////////////////////////////////////////
18 /// \ingroup tag_NSSharedMemory
19 /// \brief Shared interface file for SharedMemory Service
20 /// Detail description of interface and usage
21 /// \ref http://ptcframeworkunifiedaccbuild2/TikiWiki/tiki-index.php?page=Shared+Memory
22 /// http://ptcframeworkunifiedaspsql01/sites/ptcsweng/SW%20Engineering%20Document%20Library/
23 /// Projects/Connected%20Color%20Radio%20(CCR)/Architecture/Framework/
24 /// CCR%20Messaging.vsd
26 /// Declares the external APIs to Zone Player Service.
28 ///////////////////////////////////////////////////////////////////////////////
31 * @file ns_shared_mem.h
32 * @brief \~english Shared interface file for SharedMemory Service
35 /** @addtogroup BaseSystem
38 /** @addtogroup native_service
42 /** @addtogroup framework_unified
43 * @ingroup native_service
46 /** @addtogroup native
47 * @ingroup framework_unified
51 #ifndef __CCR_NATIVESERVICES_MESSAGECENTER_SHAREDMEMORY_H__ // NOLINT (build/header_guard)
52 #define __CCR_NATIVESERVICES_MESSAGECENTER_SHAREDMEMORY_H__
55 #include <native_service/frameworkunified_types.h> ///< Header file for Template
60 #include <sys/neutrino.h>
63 typedef struct _pulse_t TPosixHdr; ///> Header for system-provided messages
65 enum ESharedMemCommand {
66 eSharedMemCommandWrite = 1,
67 eSharedMemCommandRead = 2,
68 eSharedMemCommandSize = 3,
69 eSharedMemCommandDelete = 4,
72 #define NS_SHAREDMEM_NAME "NS_SharedMem"
73 #define NS_SHAREDMEM_SOCK_QUEUE 10
74 DEFINE_HANDLE_TYPE(SSHMemID, TShMemID);
81 uint16_t cmd; // Command to the NS_SharedMem
82 uintptr_t id; // NS_SharedMem ID
83 UI_32 size; // The size of the data to write to NS_SharedMem
87 EFrameworkunifiedStatus status; // write result
88 UI_32 size; // The size of the data to read from NS_SharedMem
95 #endif // __CCR_NATIVESERVICES_MESSAGECENTER_SHAREDMEMORY_H__ // NOLINT (build/header_guard)