3 * Copyright (c) 2020 Project CHIP Authors
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
20 * Defines platform-specific event types and data for the chip
21 * Device Layer on Linux platforms.
26 #include <platform/CHIPDeviceEvent.h>
29 namespace DeviceLayer {
31 namespace DeviceEventType {
34 * Enumerates Linux platform-specific event types that are visible to the application.
36 enum PublicPlatformSpecificEventTypes
38 /* None currently defined */
42 * Enumerates Linux platform-specific event types that are internal to the chip Device Layer.
44 enum InternalPlatformSpecificEventTypes
46 kPlatformLinuxEvent = kRange_InternalPlatformSpecific,
47 kPlatformLinuxBLECentralConnected,
48 kPlatformLinuxBLECentralConnectFailed,
49 kPlatformLinuxBLEWriteComplete,
50 kPlatformLinuxBLESubscribeOpComplete,
51 kPlatformLinuxBLEIndicationReceived,
52 kPlatformLinuxBLEC1WriteEvent,
53 kPlatformLinuxBLEOutOfBuffersEvent,
54 kPlatformLinuxBLEPeripheralRegisterAppComplete,
55 kPlatformLinuxBLEPeripheralAdvConfiguredComplete,
56 kPlatformLinuxBLEPeripheralAdvStartComplete,
57 kPlatformLinuxBLEPeripheralAdvStopComplete
60 } // namespace DeviceEventType
63 * Represents platform-specific event information for Linux platforms.
65 struct ChipDevicePlatformEvent
71 BLE_CONNECTION_OBJECT mConnection;
72 } BLECentralConnected;
76 } BLECentralConnectFailed;
79 BLE_CONNECTION_OBJECT mConnection;
83 BLE_CONNECTION_OBJECT mConnection;
85 } BLESubscribeOpComplete;
88 BLE_CONNECTION_OBJECT mConnection;
89 chip::System::PacketBuffer * mData;
90 } BLEIndicationReceived;
95 } BLEPeripheralRegisterAppComplete;
100 } BLEPeripheralAdvConfiguredComplete;
105 } BLEPeripheralAdvStartComplete;
110 } BLEPeripheralAdvStopComplete;
114 } // namespace DeviceLayer