Skip to content

src/server_api.cpp

Classes

Name
struct CtxStruct

Functions

Name
iface::Instance * getCurrentInstance(sol::this_state const s)
BufferLua * createBuffer(int const width, int const height, std::string const & format)
sol::table getCapabilities(sol::this_state const s)
sol::object getKeyValue(std::string const & key, sol::this_state const s)
bool setKeyValue(std::string const & key, sol::object const & value)
sol::table getKeys(sol::this_state const s)
long long getTime()
iface::Module * getModuleByName(string const & moduleName)
void discover1(std::string const & path)
void discover2()
std::vector< std::string > getNames()
iface::Instance * getInstanceById(std::string const & uuid, sol::this_state const s)
void post1(sol::table const & data, std::string const & type)
void post2(sol::table const & data, std::string const & type, bool const persist)
void post3(sol::table const & data, std::string const & type, bool const persist, std::string const & sourceDesc)
void post4(sol::table const & data, std::string const & type, bool const persist, std::string const & sourceDesc, BufferLua const * img)
void post5(sol::table const & data, std::string const & type, bool const persist, std::string const & sourceDesc, BufferLua const * img, std::string const & timestamp)
sol::table query(std::string const & query, sol::this_state const s)
iface::InferenceEngine * createBackend1(std::string const & uri, std::string const & name, int const poolSize, sol::this_state const s)
iface::InferenceEngine * createBackend2(std::string const & uri, std::string const & name, sol::this_state const s)
std::shared_ptr< iface::InferenceEngine > getBackendByName(std::string const & name, sol::this_state const s)
std::deque< std::wstring > getLog()
void logVerbose(std::wstring const & msg)
void logDebug(std::wstring const & msg)
void logWarning(std::wstring const & msg)
void logError(std::wstring const & msg)
void logInfo(std::wstring const & msg)
bool saveJsonToDisk(std::string const & filename, sol::table const & data)
std::string getDynamicString1(std::string const & inputString, sol::table const & data)
std::string getDynamicString2(std::string const & inputString)
sol::object nms1(sol::object const & detections, float const nmsIouThreshold, sol::this_state const s)
sol::object nms2(sol::object const & detections, float const nmsIouThreshold, float const nmsScoreThreshold, sol::this_state const s)
void saveConfigToDiskAsJson(std::string const & path, sol::this_state const s)
void loadConfigJsonFromDisk(std::string const & path, sol::this_state const s)
sol::object getConfig(sol::this_state const s)
bool setPerformanceCounterState(bool const enable)
Enable/Disable Performance metering system.
void startZone(std::string const & zoneName, bool active)
void endZone(std::string const & zoneName)

Attributes

Name
std::string loadedPath
std::mutex ctxLock
std::map< std::string, CtxStruct > ctxs

Functions Documentation

function getCurrentInstance

iface::Instance * getCurrentInstance(
    sol::this_state const s
)

function createBuffer

BufferLua * createBuffer(
    int const width,
    int const height,
    std::string const & format
)

function getCapabilities

sol::table getCapabilities(
    sol::this_state const s
)

function getKeyValue

sol::object getKeyValue(
    std::string const & key,
    sol::this_state const s
)

function setKeyValue

bool setKeyValue(
    std::string const & key,
    sol::object const & value
)

function getKeys

sol::table getKeys(
    sol::this_state const s
)

function getTime

long long getTime()

function getModuleByName

iface::Module * getModuleByName(
    string const & moduleName
)

function discover1

void discover1(
    std::string const & path
)

function discover2

void discover2()

function getNames

std::vector< std::string > getNames()

function getInstanceById

iface::Instance * getInstanceById(
    std::string const & uuid,
    sol::this_state const s
)

function post1

void post1(
    sol::table const & data,
    std::string const & type
)

function post2

void post2(
    sol::table const & data,
    std::string const & type,
    bool const persist
)

function post3

void post3(
    sol::table const & data,
    std::string const & type,
    bool const persist,
    std::string const & sourceDesc
)

function post4

void post4(
    sol::table const & data,
    std::string const & type,
    bool const persist,
    std::string const & sourceDesc,
    BufferLua const * img
)

function post5

void post5(
    sol::table const & data,
    std::string const & type,
    bool const persist,
    std::string const & sourceDesc,
    BufferLua const * img,
    std::string const & timestamp
)

function query

sol::table query(
    std::string const & query,
    sol::this_state const s
)

function createBackend1

iface::InferenceEngine * createBackend1(
    std::string const & uri,
    std::string const & name,
    int const poolSize,
    sol::this_state const s
)

function createBackend2

iface::InferenceEngine * createBackend2(
    std::string const & uri,
    std::string const & name,
    sol::this_state const s
)

function getBackendByName

std::shared_ptr< iface::InferenceEngine > getBackendByName(
    std::string const & name,
    sol::this_state const s
)

function getLog

std::deque< std::wstring > getLog()

function logVerbose

void logVerbose(
    std::wstring const & msg
)

function logDebug

void logDebug(
    std::wstring const & msg
)

function logWarning

void logWarning(
    std::wstring const & msg
)

function logError

void logError(
    std::wstring const & msg
)

function logInfo

void logInfo(
    std::wstring const & msg
)

function saveJsonToDisk

bool saveJsonToDisk(
    std::string const & filename,
    sol::table const & data
)

function getDynamicString1

std::string getDynamicString1(
    std::string const & inputString,
    sol::table const & data
)

function getDynamicString2

std::string getDynamicString2(
    std::string const & inputString
)

function nms1

sol::object nms1(
    sol::object const & detections,
    float const nmsIouThreshold,
    sol::this_state const s
)

function nms2

sol::object nms2(
    sol::object const & detections,
    float const nmsIouThreshold,
    float const nmsScoreThreshold,
    sol::this_state const s
)

function saveConfigToDiskAsJson

void saveConfigToDiskAsJson(
    std::string const & path,
    sol::this_state const s
)

function loadConfigJsonFromDisk

void loadConfigJsonFromDisk(
    std::string const & path,
    sol::this_state const s
)

function getConfig

sol::object getConfig(
    sol::this_state const s
)

function setPerformanceCounterState

bool setPerformanceCounterState(
    bool const enable
)

Enable/Disable Performance metering system.

Parameters:

  • enable bool true to enable, false to disable

Return: bool true if successful

\lua api.performance.setState

function startZone

void startZone(
    std::string const & zoneName,
    bool active
)

function endZone

void endZone(
    std::string const & zoneName
)

Attributes Documentation

variable loadedPath

static std::string loadedPath;

variable ctxLock

static std::mutex ctxLock;

variable ctxs

static std::map< std::string, CtxStruct > ctxs;

Updated on 2024-12-18 at 18:34:35 +0000