Userspace Resource Manager
Loading...
Searching...
No Matches
Relay.cpp
1// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
2// SPDX-License-Identifier: BSD-3-Clause
3
9
10#include <iostream>
11
12extern "C" void initFeature() {
13 // Use this function for initialization
14}
15
16extern "C" void tearFeature() {
17 // Use this function for cleanup
18}
19
20extern "C" void relayFeature(uint32_t signalCode,
21 std::string& mAppName,
22 std::string& mScenario,
23 int32_t mNumArgs,
24 std::vector<uint32_t>* mListArgs) {
25 // This function will be called when a relaySignal request is called for any Signal
26 // which is subscribed to this feature.
27 // For example:
28 // signal | features
29 // s1 | f1, f2, f5
30 // s2 | f5, f7, f8
31 // s3 | f9, f10
32
33 // When a relaySignal API request is received for s2, it will be relayed (forwarded) to
34 // features: f5, f7 and f8.
35}
36
37/*
38 * Compilation Notes:
39 * => Create the shared lib:
40 * "g++ -fPIC -shared -o libRelay.so Relay.cpp"
41 * This creates a shared lib, libRelay.so
42 * => This lib can have any name and can be placed in any location, the full path to the lib
43 * needs to be specified in the ExtFeaturesConfig.yaml file.
44 * => Make sure the lib file has appropriate permissions:
45 * "sudo chmod o+r <path_to_lib>"
46 */