diff options
author | takeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp> | 2020-10-27 11:16:21 +0900 |
---|---|---|
committer | takeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp> | 2020-10-27 11:16:21 +0900 |
commit | 947c78887e791596d4a5ec2d1079f8b1a049628b (patch) | |
tree | 3981e88eb8764d7180722f8466f36b756dc005af /systemservice/resource_manager/server/include/system_service/resm_type.h | |
parent | 706ad73eb02caf8532deaf5d38995bd258725cb8 (diff) |
basesystem 0.1sandbox/ToshikazuOhiwa/basesystem
Diffstat (limited to 'systemservice/resource_manager/server/include/system_service/resm_type.h')
-rw-r--r-- | systemservice/resource_manager/server/include/system_service/resm_type.h | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/systemservice/resource_manager/server/include/system_service/resm_type.h b/systemservice/resource_manager/server/include/system_service/resm_type.h new file mode 100644 index 00000000..1adbf37d --- /dev/null +++ b/systemservice/resource_manager/server/include/system_service/resm_type.h @@ -0,0 +1,85 @@ +/* + * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION. + * + * 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. + */ +/** + * @file resm_type.h + * @brief \~english This file contains declaration of common enum and structures for resm library + */ + +/** @addtogroup BaseSystem + * @{ + */ +/** @addtogroup system_service + * @ingroup BaseSystem + * @{ + */ +/** @addtogroup resource_manager + * @ingroup system_service + * @{ + */ +#ifndef RESOURCE_MANAGER_SERVER_INCLUDE_SYSTEM_SERVICE_RESM_TYPE_H_ +#define RESOURCE_MANAGER_SERVER_INCLUDE_SYSTEM_SERVICE_RESM_TYPE_H_ + +#include <agl_thread.h> + +#define NTFY_ResourceMgr_Availability MN_SS_RESOURCEMGR"/Availability" + +#define RESM_ERR_t int32_t +#define RESM_E_OK (0) +#define RESM_E_PAR (-1) +#define RESM_E_NG (-2) + +// Event flags (bit pattern) +#define RESM_EV_t uint32_t +#define RESM_EV_NOP (0x00) +#define RESM_EV_MEM (0x01) +#define RESM_EV_NAND_STATUS (0x02) + +#define RESM_RSV_t int32_t + +typedef enum { + RESM_NAND_WRITE_ENABLE = 0, + RESM_NAND_WRITE_DISABLE = -1 +} RESM_NAND_WRITE_STATUS_t; + +typedef struct { + RESM_EV_t reqEvent; + struct { + uint32_t restMemThresh; + } prm; +} RESM_REQ_EVENT_t; + +#define RESM_INET_IF_MAX 5 /* tentative */ +#define HWADDR_LEN (6) +typedef struct { + uint32_t ifNum; + struct { + char name[64]; + uint64_t rxSize; + uint64_t txSize; + uint8_t hwaddr[HWADDR_LEN]; + } ifInfo[RESM_INET_IF_MAX]; +} RESM_INET_STATUS_t; + +typedef struct { + uint32_t restMemSize; + RESM_NAND_WRITE_STATUS_t nandWriteStatus; + RESM_INET_STATUS_t inetStatus; +} RESM_STATUS_t; + +#endif // RESOURCE_MANAGER_SERVER_INCLUDE_SYSTEM_SERVICE_RESM_TYPE_H_ +/** @}*/ +/** @}*/ +/** @}*/ |