3 * Copyright (c) 2020 Project CHIP Authors
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
19 #include <platform/CHIPDeviceLayer.h>
20 #include <platform/PlatformManager.h>
23 #include "gen/attribute-id.h"
24 #include "gen/cluster-id.h"
25 #include <app/chip-zcl-zpro-codec.h>
26 #include <app/util/af-types.h>
27 #include <app/util/attribute-storage.h>
28 #include <app/util/util.h>
29 #include <core/CHIPError.h>
30 #include <support/CHIPMem.h>
31 #include <support/RandUtils.h>
39 using namespace chip::Inet;
40 using namespace chip::Transport;
41 using namespace chip::DeviceLayer;
43 void emberAfPostAttributeChangeCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId, uint8_t mask,
44 uint16_t manufacturerCode, uint8_t type, uint8_t size, uint8_t * value)
47 bool emberAfBasicClusterMfgSpecificPingCallback(void)
49 emberAfSendDefaultResponse(emberAfCurrentCommand(), EMBER_ZCL_STATUS_SUCCESS);
53 int main(int argc, char * argv[])
55 CHIP_ERROR err = CHIP_NO_ERROR;
57 err = chip::Platform::MemoryInit();
60 err = chip::DeviceLayer::PlatformMgr().InitChipStack();
63 // Init ZCL Data Model and CHIP App Server
66 chip::DeviceLayer::PlatformMgr().RunEventLoop();
69 if (err != CHIP_NO_ERROR)
71 std::cerr << "Failed to run All Clusters App: " << ErrorStr(err) << std::endl;
72 // End the program with non zero error code to indicate a error.