deCONZ C++ API v2.6.1
Loading...
Searching...
No Matches
atom_table.h
1/*
2 * Copyright (c) 2023 dresden elektronik ingenieurtechnik gmbh.
3 * All rights reserved.
4 *
5 * The software in this package is published under the terms of the BSD
6 * style license a copy of which has been included with this distribution in
7 * the LICENSE.txt file.
8 *
9 */
10
11#ifndef ATOM_TABLE_H
12#define ATOM_TABLE_H
13
14#include "deconz/atom.h"
15#include "deconz/declspec.h"
16
28#define AT_MAX_ATOM_SIZE 384
29
30#ifdef __cplusplus
31extern "C" {
32#endif
33
35DECONZ_DLLSPEC void AT_Init(unsigned max_atoms);
36
38DECONZ_DLLSPEC void AT_Destroy(void);
39
45DECONZ_DLLSPEC int AT_AddAtomString(const void *data);
46
56DECONZ_DLLSPEC int AT_AddAtom(const void *data, unsigned size, AT_AtomIndex *ati);
57
65DECONZ_DLLSPEC int AT_GetAtomIndex(const void *data, unsigned size, AT_AtomIndex *ati);
66
72DECONZ_DLLSPEC AT_Atom AT_GetAtomByIndex(AT_AtomIndex ati);
73
74#ifdef __cplusplus
75}
76#endif
77
82#endif /* ATOM_TABLE_H */
DECONZ_DLLSPEC int AT_AddAtom(const void *data, unsigned size, AT_AtomIndex *ati)
Adds an atom with data and size.
Definition atom_table.c:156
DECONZ_DLLSPEC int AT_AddAtomString(const void *data)
Adds an atom from zero terminated C-String.
Definition atom_table.c:141
DECONZ_DLLSPEC int AT_GetAtomIndex(const void *data, unsigned size, AT_AtomIndex *ati)
Returns the atom index for given data.
Definition atom_table.c:211
DECONZ_DLLSPEC void AT_Init(unsigned max_atoms)
Initialize atom table, called by core.
Definition atom_table.c:102
DECONZ_DLLSPEC void AT_Destroy(void)
Destroyes atom table, called by core.
Definition atom_table.c:122
DECONZ_DLLSPEC AT_Atom AT_GetAtomByIndex(AT_AtomIndex ati)
Returns the atom for given index.
Definition atom_table.c:247
A unique index referencing a atom.
Definition atom.h:44
Represents an atom which is uniquely stored in the atom table.
Definition atom.h:32