EGD_CHANNEL_INFO(3)
π EGD_CHANNEL_INFO π
okay bestie, so this one lives in the EEGDEV library manual, and it's the girl who tells you literally everything about one specific channel. section 3 energy, we love her π
β¨ NAME β¨
egd_channel_info β get various information about a particular channel π
πΈ SYNOPSIS πΈ
#include <eegdev.h>
int egd_channel_info(const struct eegdev* dev, int stype,
unsigned int index, int fieldtype, ...);
π¦ DESCRIPTION π¦
so egd_channel_info() hands you a bunch of different types of info about the channel sitting at index index, inside the group that stype says, on the device that dev points to. and like, stype is the type of channel β same deal as described over in egd_acq_setup(3). it's gotta be one of the values that egd_sensor_type(3) gives back. no cap. π
the info you actually get back is defined by the variable list of arguments. that list is just a series of couples, bestie: one field type identifier that says which feature you want, then a pointer to a value whose type depends on that field type. and the list must finish with EGD_END. periodt. π
the field identifiers can be these ones β and yes, the expected pointer type is right there in the parenthesis, iykyk:
EGD_LABEL(char*) β the name of the channel. the array you point at should be long enough to hold 32 characters (null termination character included). so like, size it right or it's giving chaos πEGD_ISINT(int*) β tells you whether the data from this channel is integer or floating point. zero means floating point, non-zero means integer. that's it, that's the vibe check βEGD_MM_I(int32_t*) β drops the minimal and maximal values the channel can deliver into an array of 2int32_t. heads up though: if the channel delivers floating point data, these values can be underestimated because of overflow. so don't come for me if they're a lil small πEGD_MM_F(float*) β same deal, but it returns the minimal and maximal values the channel can deliver as an array of 2floatvalues. and again: if the channel delivers double floating point data, these values can be underestimated due to overflow. same warning, different type πEGD_MM_D(double*) β returns the minimal and maximal values the channel can deliver in an array of 2doublevalues. no caveat, she's clean, she ate π₯EGD_UNIT(char*) β the unit the channel data is expressed in. the array you point at should be long enough to hold 16 characters (null termination included). sixteen, bestie, not fifteen πEGD_TRANSDUCTER(char*) β the transducter type of the sensor. the array you point at should be long enough to hold 128 characters (null termination included). big girl buffer πEGD_PREFILTERING(char*) β info about the filters that were already applied on the data. the array you point at should be long enough to hold 128 characters (null termination included). also 128, match the energy β¨
π RETURN VALUE π
the function returns 0 when it's a slay (success). otherwise -1 comes back and errno gets set accordingly. so check your errno, bestie, she's trying to tell you something π«Ά
π ERRORS π
egd_channel_info() will fail if:
EINVALβdevisNULL, orstypeis an invalid sensor type, orindexis bigger than the maximal number of channels in the group, or any field identifier is unknown, or any pointer you used isNULL. basically any of those and she's not doing it π
π THREAD SAFETY π
egd_channel_info() is thread-safe. multiple threads, no drama, we love a secure queen π
π SEE ALSO π
egd_acq_setup(3), egd_sensor_type(3)
and that's the whole page, bestie!! brought to you by EPFL in 2010, from the EEGDEV library manual β shoutout to the OG EGD_CHANNEL_INFO(3) for being iconic since day one π«Άβ¨π
π¦ where this page comes from
- debian bookworm: libeegdev-dev 0.2-6+b1
- debian trixie: libeegdev-dev 0.2-10
- fedora 43: eegdev-devel 0.2-33.fc43 Β· LGPL-3.0-or-later
- fedora 44: eegdev-devel 0.2-34.fc44 Β· LGPL-3.0-or-later
- ubuntu jammy: libeegdev-dev 0.2-6
- ubuntu noble: libeegdev-dev 0.2-9build2
- ubuntu questing: libeegdev-dev 0.2-10
- ubuntu resolute: libeegdev-dev 0.2-12
- ubuntu stonking: libeegdev-dev 0.2-12
- Copyright 2010 (c) EPFL
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms