From 738c1d56adb80ac3623251a47a7c5f2d4db57193 Mon Sep 17 00:00:00 2001 From: Naoto Yamaguchi Date: Thu, 15 Apr 2021 11:17:32 +0000 Subject: Initial commit for AGL cluster ipc library This source code is AGL instrument cluster common ipc library. Currently, this source code is missing author information, license and other. Will be add by author. Author: Nozomu Abe (nozo_abe@nippon-seiki.co.jp) Committed by Naoto Yamaguchi. Signed-off-by: Naoto Yamaguchi --- ipc_unit_test/CMakeLists.txt | 20 ++++ ipc_unit_test/ipc_unit_test_client.c | 153 ++++++++++++++++++++++++++ ipc_unit_test/ipc_unit_test_common.c | 83 +++++++++++++++ ipc_unit_test/ipc_unit_test_common.h | 17 +++ ipc_unit_test/ipc_unit_test_server.c | 201 +++++++++++++++++++++++++++++++++++ 5 files changed, 474 insertions(+) create mode 100644 ipc_unit_test/CMakeLists.txt create mode 100644 ipc_unit_test/ipc_unit_test_client.c create mode 100644 ipc_unit_test/ipc_unit_test_common.c create mode 100644 ipc_unit_test/ipc_unit_test_common.h create mode 100644 ipc_unit_test/ipc_unit_test_server.c (limited to 'ipc_unit_test') diff --git a/ipc_unit_test/CMakeLists.txt b/ipc_unit_test/CMakeLists.txt new file mode 100644 index 0000000..32d2118 --- /dev/null +++ b/ipc_unit_test/CMakeLists.txt @@ -0,0 +1,20 @@ + +# Define project Targets +set(TEST_CLIENT_NAME ipc_unit_test_client) +set(TEST_SERVER_NAME ipc_unit_test_server) + +add_executable(${TEST_CLIENT_NAME} ipc_unit_test_client.c ipc_unit_test_common.c) +target_link_libraries(${TEST_CLIENT_NAME} ${TARGET_NAME}) +target_include_directories(${TEST_CLIENT_NAME} PRIVATE + ./ + $ +) + +add_executable(${TEST_SERVER_NAME} ipc_unit_test_server.c ipc_unit_test_common.c) +target_link_libraries(${TEST_SERVER_NAME} ${TARGET_NAME}) +target_include_directories(${TEST_SERVER_NAME} PRIVATE + ./ + $ +) + + diff --git a/ipc_unit_test/ipc_unit_test_client.c b/ipc_unit_test/ipc_unit_test_client.c new file mode 100644 index 0000000..4a49b22 --- /dev/null +++ b/ipc_unit_test/ipc_unit_test_client.c @@ -0,0 +1,153 @@ +#include +#include +#include +#include +#include +#include + +#include "ipc_unit_test_common.h" + +IPC_DATA_IC_SERVICE_S g_dataIcService; + +static void changeNotifyCb(void* pData, signed int size, int kind); +static void helpPrint(void); +static void listPrint(void); + +int main(void) +{ + IPC_RET_E ret; + char command[10]; + char dummy[10]; + bool isRunning = true; + signed int size; + char *pRetStr; + + memset(&g_dataIcService, 0, sizeof(g_dataIcService)); + + ret = ipcClientStart(IPC_USAGE_TYPE_IC_SERVICE); + if (ret != IPC_RET_OK) { + printf("ipcClientStart Error:%d\n", ret); + goto end; + } + + ret = ipcRegisterCallback(IPC_USAGE_TYPE_IC_SERVICE, changeNotifyCb); + if (ret != IPC_RET_OK) { + printf("ipcRegisterCallback Error:%d\n", ret); + goto end; + } + + while(isRunning) { + printf("command (h=help, q=quit):"); + pRetStr = fgets(command, 10, stdin); + if (pRetStr == NULL) { + continue; + } + memcpy(dummy, command, 10); + + while(strlen(dummy) == 9 && dummy[8] != '\n') { + pRetStr = fgets(dummy, 10, stdin); + if (pRetStr == NULL) { + break; + } + } + + command[strlen(command)-1] = '\0'; + + switch(command[0]) { + case 'h': + helpPrint(); + break; + case 'q': + isRunning = false; + break; + case 'r': + size = sizeof(g_dataIcService); + ret = ipcReadDataPool(IPC_USAGE_TYPE_IC_SERVICE, &g_dataIcService, &size); + printf("ipcReadDataPool return:%d\n", ret); + listPrint(); + break; + default: + break; + } + } + +end: + ipcClientStop(IPC_USAGE_TYPE_IC_SERVICE); + printf("bye...\n"); + sleep(1); + + return 0; +} + +static void changeNotifyCb(void* pData, signed int size, int kind) +{ + signed long longVal; + signed int intVal; + signed short shortVal; + signed char charVal; + + printf("Enter %s\n", __func__); + + switch(size) { + case 8: + longVal = *((signed long*)pData); + printf("kind = %d, size = %d, data=%ld\n", kind, size, longVal); + break; + case 4: + intVal = *((signed int*)pData); + printf("kind = %d, size = %d, data=%d\n", kind, size, intVal); + break; + case 2: + shortVal = *((signed short *)pData); + printf("kind = %d, size = %d, data=%d\n", kind, size, shortVal); + break; + default: + charVal = *((signed char *)pData); + printf("kind = %d, size = %d, data=%d\n", kind, size, charVal); + break; + } + printf("Leave %s\n", __func__); + return; +} + +static void helpPrint(void) +{ + printf("\n-----------\n"); + printf("'h' : help\n"); + printf("'q' : quit\n"); + printf("'r' : read from Client data pool\n"); + printf("-----------\n\n"); +} + +static void listPrint(void) +{ + int i; + signed long longVal; + signed int intVal; + signed short shortVal; + signed char charVal; + void *pValue; + + for (i = 0; i < IC_SERVICE_LIST_NUM; i++) { + pValue = (void *)&g_dataIcService + IcServiceList[i].offset; + switch(IcServiceList[i].size) { + case 8: + longVal = *((signed long*)pValue); + printf("%3d: %s(%d) = %ld\n", i, IcServiceList[i].name, IcServiceList[i].size, longVal); + break; + case 4: + intVal = *((signed int*)pValue); + printf("%3d: %s(%d) = %d\n", i, IcServiceList[i].name, IcServiceList[i].size, intVal); + break; + case 2: + shortVal = *((signed short *)pValue); + printf("%3d: %s(%d) = %d\n", i, IcServiceList[i].name, IcServiceList[i].size, shortVal); + break; + default: + charVal = *((signed char *)pValue); + printf("%3d: %s(%d) = %d\n", i, IcServiceList[i].name, IcServiceList[i].size, charVal); + break; + } + } +} + diff --git a/ipc_unit_test/ipc_unit_test_common.c b/ipc_unit_test/ipc_unit_test_common.c new file mode 100644 index 0000000..02416c2 --- /dev/null +++ b/ipc_unit_test/ipc_unit_test_common.c @@ -0,0 +1,83 @@ +#include +#include "ipc_unit_test_common.h" + +IPC_UNIT_TEST_DATA_LIST IcServiceList[] = { + DEFINE_STRUCT_DATA(IPC_DATA_IC_SERVICE_S, turnR), + DEFINE_STRUCT_DATA(IPC_DATA_IC_SERVICE_S, turnL), + DEFINE_STRUCT_DATA(IPC_DATA_IC_SERVICE_S, brake), + DEFINE_STRUCT_DATA(IPC_DATA_IC_SERVICE_S, seatbelt), + DEFINE_STRUCT_DATA(IPC_DATA_IC_SERVICE_S, frontRightSeatbelt), + DEFINE_STRUCT_DATA(IPC_DATA_IC_SERVICE_S, frontCenterSeatbelt), + DEFINE_STRUCT_DATA(IPC_DATA_IC_SERVICE_S, frontLeftSeatbelt), + DEFINE_STRUCT_DATA(IPC_DATA_IC_SERVICE_S, mid1RightSeatbelt), + DEFINE_STRUCT_DATA(IPC_DATA_IC_SERVICE_S, mid1CenterSeatbelt), + DEFINE_STRUCT_DATA(IPC_DATA_IC_SERVICE_S, mid1LeftSeatbelt), + DEFINE_STRUCT_DATA(IPC_DATA_IC_SERVICE_S, mid2RightSeatbelt), + DEFINE_STRUCT_DATA(IPC_DATA_IC_SERVICE_S, mid2CenterSeatbelt), + DEFINE_STRUCT_DATA(IPC_DATA_IC_SERVICE_S, mid2LeftSeatbelt), + DEFINE_STRUCT_DATA(IPC_DATA_IC_SERVICE_S, rearRightSeatbelt), + DEFINE_STRUCT_DATA(IPC_DATA_IC_SERVICE_S, rearCenterSeatbelt), + DEFINE_STRUCT_DATA(IPC_DATA_IC_SERVICE_S, rearLeftSeatbelt), + DEFINE_STRUCT_DATA(IPC_DATA_IC_SERVICE_S, highbeam), + DEFINE_STRUCT_DATA(IPC_DATA_IC_SERVICE_S, door), + DEFINE_STRUCT_DATA(IPC_DATA_IC_SERVICE_S, frontRightDoor), + DEFINE_STRUCT_DATA(IPC_DATA_IC_SERVICE_S, frontLeftDoor), + DEFINE_STRUCT_DATA(IPC_DATA_IC_SERVICE_S, rearRightDoor), + DEFINE_STRUCT_DATA(IPC_DATA_IC_SERVICE_S, rearLeftDoor), + DEFINE_STRUCT_DATA(IPC_DATA_IC_SERVICE_S, trunkDoor), + DEFINE_STRUCT_DATA(IPC_DATA_IC_SERVICE_S, hoodDoor), + DEFINE_STRUCT_DATA(IPC_DATA_IC_SERVICE_S, eps), + DEFINE_STRUCT_DATA(IPC_DATA_IC_SERVICE_S, srsAirbag), + DEFINE_STRUCT_DATA(IPC_DATA_IC_SERVICE_S, abs), + DEFINE_STRUCT_DATA(IPC_DATA_IC_SERVICE_S, lowBattery), + DEFINE_STRUCT_DATA(IPC_DATA_IC_SERVICE_S, oilPress), + DEFINE_STRUCT_DATA(IPC_DATA_IC_SERVICE_S, engine), + DEFINE_STRUCT_DATA(IPC_DATA_IC_SERVICE_S, fuel), + DEFINE_STRUCT_DATA(IPC_DATA_IC_SERVICE_S, immobi), + DEFINE_STRUCT_DATA(IPC_DATA_IC_SERVICE_S, tmFail), + DEFINE_STRUCT_DATA(IPC_DATA_IC_SERVICE_S, espAct), + DEFINE_STRUCT_DATA(IPC_DATA_IC_SERVICE_S, espOff), + DEFINE_STRUCT_DATA(IPC_DATA_IC_SERVICE_S, adaptingLighting), + DEFINE_STRUCT_DATA(IPC_DATA_IC_SERVICE_S, autoStop), + DEFINE_STRUCT_DATA(IPC_DATA_IC_SERVICE_S, autoStopFail), + DEFINE_STRUCT_DATA(IPC_DATA_IC_SERVICE_S, parkingLights), + DEFINE_STRUCT_DATA(IPC_DATA_IC_SERVICE_S, frontFog), + DEFINE_STRUCT_DATA(IPC_DATA_IC_SERVICE_S, exteriorLightFault), + DEFINE_STRUCT_DATA(IPC_DATA_IC_SERVICE_S, accFail), + DEFINE_STRUCT_DATA(IPC_DATA_IC_SERVICE_S, ldwOff), + DEFINE_STRUCT_DATA(IPC_DATA_IC_SERVICE_S, hillDescent), + DEFINE_STRUCT_DATA(IPC_DATA_IC_SERVICE_S, autoHiBeamGreen), + DEFINE_STRUCT_DATA(IPC_DATA_IC_SERVICE_S, autoHiBeamAmber), + DEFINE_STRUCT_DATA(IPC_DATA_IC_SERVICE_S, sportsMode), + DEFINE_STRUCT_DATA(IPC_DATA_IC_SERVICE_S, ldwOperate), + DEFINE_STRUCT_DATA(IPC_DATA_IC_SERVICE_S, generalWarn), + DEFINE_STRUCT_DATA(IPC_DATA_IC_SERVICE_S, drivingPowerMode), + DEFINE_STRUCT_DATA(IPC_DATA_IC_SERVICE_S, hotTemp), + DEFINE_STRUCT_DATA(IPC_DATA_IC_SERVICE_S, lowTemp), + DEFINE_STRUCT_DATA(IPC_DATA_IC_SERVICE_S, gearAtVal), + DEFINE_STRUCT_DATA(IPC_DATA_IC_SERVICE_S, gearMtVal), + DEFINE_STRUCT_DATA(IPC_DATA_IC_SERVICE_S, spAnalogVal), + DEFINE_STRUCT_DATA(IPC_DATA_IC_SERVICE_S, spAnaDigUnitVal), + DEFINE_STRUCT_DATA(IPC_DATA_IC_SERVICE_S, taAnalogVal), + DEFINE_STRUCT_DATA(IPC_DATA_IC_SERVICE_S, trcomTripAVal), + DEFINE_STRUCT_DATA(IPC_DATA_IC_SERVICE_S, trcomTripBVal), + DEFINE_STRUCT_DATA(IPC_DATA_IC_SERVICE_S, trcomOdoVal), + DEFINE_STRUCT_DATA(IPC_DATA_IC_SERVICE_S, trcomUnitVal), + DEFINE_STRUCT_DATA(IPC_DATA_IC_SERVICE_S, avgSpeedAVal), + DEFINE_STRUCT_DATA(IPC_DATA_IC_SERVICE_S, avgSpeedBVal), + DEFINE_STRUCT_DATA(IPC_DATA_IC_SERVICE_S, hourAVal), + DEFINE_STRUCT_DATA(IPC_DATA_IC_SERVICE_S, hourBVal), + DEFINE_STRUCT_DATA(IPC_DATA_IC_SERVICE_S, minuteAVal), + DEFINE_STRUCT_DATA(IPC_DATA_IC_SERVICE_S, minuteBVal), + DEFINE_STRUCT_DATA(IPC_DATA_IC_SERVICE_S, secondAVal), + DEFINE_STRUCT_DATA(IPC_DATA_IC_SERVICE_S, secondBVal), + DEFINE_STRUCT_DATA(IPC_DATA_IC_SERVICE_S, oTempVal), + DEFINE_STRUCT_DATA(IPC_DATA_IC_SERVICE_S, oTempUnitVal), + DEFINE_STRUCT_DATA(IPC_DATA_IC_SERVICE_S, cruRangeVal), + DEFINE_STRUCT_DATA(IPC_DATA_IC_SERVICE_S, avgFuelAVal), + DEFINE_STRUCT_DATA(IPC_DATA_IC_SERVICE_S, avgFuelBVal), + DEFINE_STRUCT_DATA(IPC_DATA_IC_SERVICE_S, insFuelAVal), + DEFINE_STRUCT_DATA(IPC_DATA_IC_SERVICE_S, insFuelBVal), + DEFINE_STRUCT_DATA(IPC_DATA_IC_SERVICE_S, fuelEconomyUnitVal) +}; + diff --git a/ipc_unit_test/ipc_unit_test_common.h b/ipc_unit_test/ipc_unit_test_common.h new file mode 100644 index 0000000..e4ad196 --- /dev/null +++ b/ipc_unit_test/ipc_unit_test_common.h @@ -0,0 +1,17 @@ +#ifndef IPC_UNIT_TEST_COMMON_H +#define IPC_UNIT_TEST_COMMON_H +#include + +#define DEFINE_STRUCT_DATA(struct_name, member) \ + {#member, offsetof(struct_name, member), sizeof(((struct_name *)0)->member)} +#define IC_SERVICE_LIST_NUM (77) + +typedef struct { + const char *name; + int offset; + int size; +} IPC_UNIT_TEST_DATA_LIST; + +extern IPC_UNIT_TEST_DATA_LIST IcServiceList[]; + +#endif // IPC_UNIT_TEST_COMMON_H diff --git a/ipc_unit_test/ipc_unit_test_server.c b/ipc_unit_test/ipc_unit_test_server.c new file mode 100644 index 0000000..374cda6 --- /dev/null +++ b/ipc_unit_test/ipc_unit_test_server.c @@ -0,0 +1,201 @@ +#include +#include +#include +#include +#include + +#include + +#include "ipc_unit_test_common.h" + +static void helpPrint(void); +static void helpWritePrint(void); +static void listPrint(void); +static void writeData(void); +static void writeDataToStruct(int id, long value); + +IPC_DATA_IC_SERVICE_S g_dataIcService; + +int main(void) +{ + IPC_RET_E ret; + char command[10]; + char dummy[10]; + bool isRunning = true; + char *pRetStr; + + memset(&g_dataIcService, 0, sizeof(g_dataIcService)); + + ret = ipcServerStart(IPC_USAGE_TYPE_IC_SERVICE); + if (ret != IPC_RET_OK) { + printf("ipcServerStart Error:%d\n", ret); + goto end; + } + + while(isRunning) { + printf("command (h=help, q=quit):"); + pRetStr = fgets(command, 10, stdin); + if (pRetStr == NULL) { + continue; + } + memcpy(dummy, command, 10); + + while(strlen(dummy) == 9 && dummy[8] != '\n') { + pRetStr = fgets(dummy, 10, stdin); + if (pRetStr == NULL) { + break; + } + } + + command[strlen(command)-1] = '\0'; + + switch(command[0]) { + case 'h': + helpPrint(); + break; + case 'q': + isRunning = false; + break; + case 'l': + listPrint(); + break; + case 'w': + writeData(); + break; + case 's': + ret = ipcSendMessage(IPC_USAGE_TYPE_IC_SERVICE, (const void*)&g_dataIcService, sizeof(g_dataIcService)); + printf("ipcSendMessage return:%d\n", ret); + break; + default: + break; + } + } + +end: + ipcServerStop(IPC_USAGE_TYPE_IC_SERVICE); + printf("bye...\n"); + sleep(1); + + return 0; +} + +static void helpPrint(void) +{ + printf("\n-----------\n"); + printf("'h' : help\n"); + printf("'q' : quit\n"); + printf("'l' : list of Server data\n"); + printf("'w' : write to Server data\n"); + printf("'s' : send data to Client\n"); + printf("-----------\n\n"); +} + +static void listPrint(void) +{ + int i; + signed long longVal; + signed int intVal; + signed short shortVal; + signed char charVal; + void *pValue; + + for (i = 0; i < IC_SERVICE_LIST_NUM; i++) { + pValue = (void *)&g_dataIcService + IcServiceList[i].offset; + switch(IcServiceList[i].size) { + case 8: + longVal = *((signed long*)pValue); + printf("%3d: %s(%d) = %ld\n", i, IcServiceList[i].name, IcServiceList[i].size, longVal); + break; + case 4: + intVal = *((signed int*)pValue); + printf("%3d: %s(%d) = %d\n", i, IcServiceList[i].name, IcServiceList[i].size, intVal); + break; + case 2: + shortVal = *((signed short *)pValue); + printf("%3d: %s(%d) = %d\n", i, IcServiceList[i].name, IcServiceList[i].size, shortVal); + break; + default: + charVal = *((signed char *)pValue); + printf("%3d: %s(%d) = %d\n", i, IcServiceList[i].name, IcServiceList[i].size, charVal); + break; + } + } +} + +static void writeData(void) +{ + char command[40]; + char dummy[40]; + bool isRunning = true; + int i; + + int id; + long value; + + char *pRetStr; + + while(isRunning) { + printf("write command (h=help q=goto main menu):"); + pRetStr = fgets(command, 40, stdin); + if (pRetStr == NULL) { + continue; + } + memcpy(dummy, command, 40); + + while(strlen(dummy) == 39 && dummy[38] != '\n') { + pRetStr = fgets(dummy, 40, stdin); + if (pRetStr == NULL) { + break; + } + } + + command[strlen(command)-1] = '\0'; + switch(command[0]) { + case 'h': + helpWritePrint(); + break; + case 'q': + isRunning = false; + break; + case 'l': + listPrint(); + break; + default: + // write data + id = (int)strtol(command, NULL, 0); + value = 0; + for (i = 0; i < strlen(command); i++) { + if (command[i] == ' ') { + value = (int)strtol(&command[i], NULL, 0); + } + } + writeDataToStruct(id, value); + } + } +} + +static void helpWritePrint(void) +{ + printf("\n-----------\n"); + printf("'h' : help\n"); + printf("'q' : goto main menu\n"); + printf("'l' : list of Server data\n"); + printf(" : write data\n"); + printf(" ex)\n"); + printf(" write command 2 4\n"); + printf(" -> 2: brake = 4\n"); + printf("-----------\n\n"); +} + +static void writeDataToStruct(int id, long value) +{ + void *pValue; + + if (id < 0 || IC_SERVICE_LIST_NUM < id) { + return; + } + + pValue = (void *)&g_dataIcService + IcServiceList[id].offset; + memcpy(pValue, (void *)&value, IcServiceList[id].size); +} + -- cgit 1.2.3-korg From c2aff1efa31287c8e26049319c06e4dcab82dc3e Mon Sep 17 00:00:00 2001 From: MasanoriMaruyama <82852796+MasanoriMaruyama@users.noreply.github.com> Date: Mon, 24 May 2021 16:42:29 +0900 Subject: Add license and Author information --- CMakeLists.txt | 3 ++ LICENSE | 54 ++++++++++++++++++++++++++++++++++++ include/ipc.h | 17 ++++++++++++ include/ipc_protocol.h | 17 ++++++++++++ ipc_unit_test/CMakeLists.txt | 2 ++ ipc_unit_test/ipc_unit_test_client.c | 18 ++++++++++++ ipc_unit_test/ipc_unit_test_common.c | 17 ++++++++++++ ipc_unit_test/ipc_unit_test_common.h | 17 ++++++++++++ ipc_unit_test/ipc_unit_test_server.c | 17 ++++++++++++ src/CMakeLists.txt | 2 ++ src/ipc_client.c | 17 ++++++++++++ src/ipc_internal.c | 17 ++++++++++++ src/ipc_internal.h | 17 ++++++++++++ src/ipc_server.c | 17 ++++++++++++ src/ipc_usage_info_table.c | 18 ++++++++++++ 15 files changed, 250 insertions(+) create mode 100644 LICENSE (limited to 'ipc_unit_test') diff --git a/CMakeLists.txt b/CMakeLists.txt index 501bf48..a09fff5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,3 +1,6 @@ +# Copyright (c) 2021, Nippon Seiki Co., Ltd. +# SPDX-License-Identifier: Apache-2.0 + project(ipc C) cmake_minimum_required(VERSION 2.8) diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..31c692a --- /dev/null +++ b/LICENSE @@ -0,0 +1,54 @@ +Apache License + +Version 2.0, January 2004 + +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. + +"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + + You must give any other recipients of the Work or Derivative Works a copy of this License; and + You must cause any modified files to carry prominent notices stating that You changed the files; and + You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. + + You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS diff --git a/include/ipc.h b/include/ipc.h index d1bc90d..64b731c 100644 --- a/include/ipc.h +++ b/include/ipc.h @@ -1,3 +1,20 @@ +/* + * Copyright (c) 2021, Nippon Seiki Co., Ltd. + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef IPC_H #define IPC_H diff --git a/include/ipc_protocol.h b/include/ipc_protocol.h index c0ad861..dc703d0 100644 --- a/include/ipc_protocol.h +++ b/include/ipc_protocol.h @@ -1,3 +1,20 @@ +/* + * Copyright (c) 2021, Nippon Seiki Co., Ltd. + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef IPC_PROTOCOL_H #define IPC_PROTOCOL_H diff --git a/ipc_unit_test/CMakeLists.txt b/ipc_unit_test/CMakeLists.txt index 32d2118..944ad0b 100644 --- a/ipc_unit_test/CMakeLists.txt +++ b/ipc_unit_test/CMakeLists.txt @@ -1,3 +1,5 @@ +# Copyright (c) 2021, Nippon Seiki Co., Ltd. +# SPDX-License-Identifier: Apache-2.0 # Define project Targets set(TEST_CLIENT_NAME ipc_unit_test_client) diff --git a/ipc_unit_test/ipc_unit_test_client.c b/ipc_unit_test/ipc_unit_test_client.c index 4a49b22..f6e2f5c 100644 --- a/ipc_unit_test/ipc_unit_test_client.c +++ b/ipc_unit_test/ipc_unit_test_client.c @@ -1,3 +1,21 @@ +/* + * Copyright (c) 2021, Nippon Seiki Co., Ltd. + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + #include #include #include diff --git a/ipc_unit_test/ipc_unit_test_common.c b/ipc_unit_test/ipc_unit_test_common.c index 02416c2..05169bf 100644 --- a/ipc_unit_test/ipc_unit_test_common.c +++ b/ipc_unit_test/ipc_unit_test_common.c @@ -1,3 +1,20 @@ +/* + * Copyright (c) 2021, Nippon Seiki Co., Ltd. + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #include #include "ipc_unit_test_common.h" diff --git a/ipc_unit_test/ipc_unit_test_common.h b/ipc_unit_test/ipc_unit_test_common.h index e4ad196..e0a3ed5 100644 --- a/ipc_unit_test/ipc_unit_test_common.h +++ b/ipc_unit_test/ipc_unit_test_common.h @@ -1,3 +1,20 @@ +/* + * Copyright (c) 2021, Nippon Seiki Co., Ltd. + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef IPC_UNIT_TEST_COMMON_H #define IPC_UNIT_TEST_COMMON_H #include diff --git a/ipc_unit_test/ipc_unit_test_server.c b/ipc_unit_test/ipc_unit_test_server.c index 374cda6..f627dca 100644 --- a/ipc_unit_test/ipc_unit_test_server.c +++ b/ipc_unit_test/ipc_unit_test_server.c @@ -1,3 +1,20 @@ +/* + * Copyright (c) 2021, Nippon Seiki Co., Ltd. + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #include #include #include diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index a2443d1..45088cb 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,3 +1,5 @@ +# Copyright (c) 2021, Nippon Seiki Co., Ltd. +# SPDX-License-Identifier: Apache-2.0 # Define project Targets add_library(${TARGET_NAME} SHARED diff --git a/src/ipc_client.c b/src/ipc_client.c index 2bfd576..7e404e7 100644 --- a/src/ipc_client.c +++ b/src/ipc_client.c @@ -1,3 +1,20 @@ +/* + * Copyright (c) 2021, Nippon Seiki Co., Ltd. + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #include #include #include diff --git a/src/ipc_internal.c b/src/ipc_internal.c index c42e2a4..1958655 100644 --- a/src/ipc_internal.c +++ b/src/ipc_internal.c @@ -1,3 +1,20 @@ +/* + * Copyright (c) 2021, Nippon Seiki Co., Ltd. + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #include #include #include diff --git a/src/ipc_internal.h b/src/ipc_internal.h index 972a58b..486692b 100644 --- a/src/ipc_internal.h +++ b/src/ipc_internal.h @@ -1,3 +1,20 @@ +/* + * Copyright (c) 2021, Nippon Seiki Co., Ltd. + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef IPC_INTERNAL_H #define IPC_INTERNAL_H diff --git a/src/ipc_server.c b/src/ipc_server.c index 809a644..74eb7bc 100644 --- a/src/ipc_server.c +++ b/src/ipc_server.c @@ -1,3 +1,20 @@ +/* + * Copyright (c) 2021, Nippon Seiki Co., Ltd. + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #include #include #include diff --git a/src/ipc_usage_info_table.c b/src/ipc_usage_info_table.c index 976cc73..e127fde 100644 --- a/src/ipc_usage_info_table.c +++ b/src/ipc_usage_info_table.c @@ -1,3 +1,21 @@ +/* + * Copyright (c) 2021, Nippon Seiki Co., Ltd. + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + #include #include "ipc_internal.h" -- cgit 1.2.3-korg From da8e71cb35ed0ba62f39bf2abcb5055016874b03 Mon Sep 17 00:00:00 2001 From: t-kmt123 Date: Tue, 6 Jul 2021 14:16:38 +0900 Subject: rename libipc --- CMakeLists.txt | 8 +++--- cluster_ipc.pc.in | 10 ++++++++ include/cluster_ipc.h | 49 ++++++++++++++++++++++++++++++++++++ include/ipc.h | 49 ------------------------------------ ipc.pc.in | 10 -------- ipc_unit_test/ipc_unit_test_client.c | 2 +- ipc_unit_test/ipc_unit_test_common.c | 2 +- ipc_unit_test/ipc_unit_test_server.c | 2 +- src/CMakeLists.txt | 2 +- src/ipc_client.c | 2 +- src/ipc_internal.c | 2 +- src/ipc_server.c | 2 +- src/ipc_usage_info_table.c | 2 +- 13 files changed, 71 insertions(+), 71 deletions(-) create mode 100644 cluster_ipc.pc.in create mode 100644 include/cluster_ipc.h delete mode 100644 include/ipc.h delete mode 100644 ipc.pc.in (limited to 'ipc_unit_test') diff --git a/CMakeLists.txt b/CMakeLists.txt index a09fff5..6db6abb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ # Copyright (c) 2021, Nippon Seiki Co., Ltd. # SPDX-License-Identifier: Apache-2.0 -project(ipc C) +project(cluster_ipc C) cmake_minimum_required(VERSION 2.8) @@ -20,7 +20,7 @@ include(GNUInstallDirs) set(IPC_LIBRARY_VERSION "1.0.0") # Name of library API -set(TARGET_NAME ipc) +set(TARGET_NAME cluster_ipc) # Name of IC-service server API #set(SERVER_API_NAME cluster_server_api) @@ -29,7 +29,7 @@ set(TARGET_NAME ipc) add_subdirectory(src) add_subdirectory(ipc_unit_test) -configure_file(ipc.pc.in ipc.pc @ONLY) -install(FILES ${CMAKE_CURRENT_BINARY_DIR}/ipc.pc +configure_file(cluster_ipc.pc.in cluster_ipc.pc @ONLY) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cluster_ipc.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) diff --git a/cluster_ipc.pc.in b/cluster_ipc.pc.in new file mode 100644 index 0000000..dac9b70 --- /dev/null +++ b/cluster_ipc.pc.in @@ -0,0 +1,10 @@ +prefix=@CMAKE_INSTALL_PREFIX@ +includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ +libdir=@CMAKE_INSTALL_FULL_LIBDIR@ + +Name: @TARGET_NAME@ +Description: client and server ipc library by domain socket with defined shared data protocol +Version: @IPC_LIBRARY_VERSION@ + +Cflags: -I${includedir} +Libs: -L${libdir} -lcluster_ipc diff --git a/include/cluster_ipc.h b/include/cluster_ipc.h new file mode 100644 index 0000000..64b731c --- /dev/null +++ b/include/cluster_ipc.h @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2021, Nippon Seiki Co., Ltd. + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef IPC_H +#define IPC_H + +#include + +// Environment Variable for unix-domain-socket file path +#define IPC_ENV_DOMAIN_SOCKET_PATH "IPC_DOMAIN_PATH" + +// return value for API +typedef enum { + IPC_RET_OK = 0, + IPC_ERR_PARAM, + IPC_ERR_SEQUENCE, + IPC_ERR_NO_RESOURCE, + IPC_ERR_OTHER +} IPC_RET_E; + +// format of callback function +typedef void (*IPC_CHANGE_NOTIFY_CB)(void* pData, signed int size, int kind); + +// for Server Function +IPC_RET_E ipcServerStart(IPC_USAGE_TYPE_E usageType); +IPC_RET_E ipcSendMessage(IPC_USAGE_TYPE_E usageType, const void* pData, signed int size); +IPC_RET_E ipcServerStop(IPC_USAGE_TYPE_E usageType); + +// for Client Function +IPC_RET_E ipcClientStart(IPC_USAGE_TYPE_E usageType); +IPC_RET_E ipcReadDataPool(IPC_USAGE_TYPE_E usageType, void* pData, signed int* pSize); +IPC_RET_E ipcRegisterCallback(IPC_USAGE_TYPE_E usageType, IPC_CHANGE_NOTIFY_CB changeNotifyCb); +IPC_RET_E ipcClientStop(IPC_USAGE_TYPE_E usageType); + +#endif // IPC_H diff --git a/include/ipc.h b/include/ipc.h deleted file mode 100644 index 64b731c..0000000 --- a/include/ipc.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) 2021, Nippon Seiki Co., Ltd. - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef IPC_H -#define IPC_H - -#include - -// Environment Variable for unix-domain-socket file path -#define IPC_ENV_DOMAIN_SOCKET_PATH "IPC_DOMAIN_PATH" - -// return value for API -typedef enum { - IPC_RET_OK = 0, - IPC_ERR_PARAM, - IPC_ERR_SEQUENCE, - IPC_ERR_NO_RESOURCE, - IPC_ERR_OTHER -} IPC_RET_E; - -// format of callback function -typedef void (*IPC_CHANGE_NOTIFY_CB)(void* pData, signed int size, int kind); - -// for Server Function -IPC_RET_E ipcServerStart(IPC_USAGE_TYPE_E usageType); -IPC_RET_E ipcSendMessage(IPC_USAGE_TYPE_E usageType, const void* pData, signed int size); -IPC_RET_E ipcServerStop(IPC_USAGE_TYPE_E usageType); - -// for Client Function -IPC_RET_E ipcClientStart(IPC_USAGE_TYPE_E usageType); -IPC_RET_E ipcReadDataPool(IPC_USAGE_TYPE_E usageType, void* pData, signed int* pSize); -IPC_RET_E ipcRegisterCallback(IPC_USAGE_TYPE_E usageType, IPC_CHANGE_NOTIFY_CB changeNotifyCb); -IPC_RET_E ipcClientStop(IPC_USAGE_TYPE_E usageType); - -#endif // IPC_H diff --git a/ipc.pc.in b/ipc.pc.in deleted file mode 100644 index 55c1157..0000000 --- a/ipc.pc.in +++ /dev/null @@ -1,10 +0,0 @@ -prefix=@CMAKE_INSTALL_PREFIX@ -includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ -libdir=@CMAKE_INSTALL_FULL_LIBDIR@ - -Name: @TARGET_NAME@ -Description: client and server ipc library by domain socket with defined shared data protocol -Version: @IPC_LIBRARY_VERSION@ - -Cflags: -I${includedir} -Libs: -L${libdir} -lipc \ No newline at end of file diff --git a/ipc_unit_test/ipc_unit_test_client.c b/ipc_unit_test/ipc_unit_test_client.c index f6e2f5c..cc09d2a 100644 --- a/ipc_unit_test/ipc_unit_test_client.c +++ b/ipc_unit_test/ipc_unit_test_client.c @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include "ipc_unit_test_common.h" diff --git a/ipc_unit_test/ipc_unit_test_common.c b/ipc_unit_test/ipc_unit_test_common.c index 05169bf..26d4830 100644 --- a/ipc_unit_test/ipc_unit_test_common.c +++ b/ipc_unit_test/ipc_unit_test_common.c @@ -15,7 +15,7 @@ * limitations under the License. */ -#include +#include #include "ipc_unit_test_common.h" IPC_UNIT_TEST_DATA_LIST IcServiceList[] = { diff --git a/ipc_unit_test/ipc_unit_test_server.c b/ipc_unit_test/ipc_unit_test_server.c index f627dca..807db2c 100644 --- a/ipc_unit_test/ipc_unit_test_server.c +++ b/ipc_unit_test/ipc_unit_test_server.c @@ -21,7 +21,7 @@ #include #include -#include +#include #include "ipc_unit_test_common.h" diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 45088cb..dc9366a 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -34,4 +34,4 @@ install( LIBRARY DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR} # PUBLIC_HEADER DESTINATION include ) -install(FILES ../include/ipc.h ../include/ipc_protocol.h DESTINATION include) +install(FILES ../include/cluster_ipc.h ../include/ipc_protocol.h DESTINATION include) diff --git a/src/ipc_client.c b/src/ipc_client.c index 7e404e7..1a4a031 100644 --- a/src/ipc_client.c +++ b/src/ipc_client.c @@ -26,7 +26,7 @@ #include #include -#include +#include #include "ipc_internal.h" #define IPC_CLIENT_USAGE_MAX_NUM (4) diff --git a/src/ipc_internal.c b/src/ipc_internal.c index 1958655..7a37866 100644 --- a/src/ipc_internal.c +++ b/src/ipc_internal.c @@ -20,7 +20,7 @@ #include #include -#include +#include #include "ipc_internal.h" int ipcCreateDomainName(IPC_USAGE_TYPE_E usageType, char *pOutName, int *pSize) diff --git a/src/ipc_server.c b/src/ipc_server.c index 74eb7bc..301409c 100644 --- a/src/ipc_server.c +++ b/src/ipc_server.c @@ -27,7 +27,7 @@ #include #include -#include +#include #include "ipc_internal.h" diff --git a/src/ipc_usage_info_table.c b/src/ipc_usage_info_table.c index e127fde..a1f0939 100644 --- a/src/ipc_usage_info_table.c +++ b/src/ipc_usage_info_table.c @@ -16,7 +16,7 @@ */ -#include +#include #include "ipc_internal.h" #define DEFINE_OFFSET_SIZE(struct_name, member, kind) \ -- cgit 1.2.3-korg