This documenta- tion describes the current state of development.
Note that interfaces and functionality may still change.

Prokee Modules:
  A
  B
  C
  D
  E
  F
  G
  I
  L
  M
  N
  O
  P
  R
  S
  T
  U
  W

     open all    |    close all

GUI Elements:
  B
  C
  I
  M
  P
  R
  S
  T

     open all    |    close all

GUI Interactions:
  B
  F
  H
  S

     open all    |    close all

GUI Layouts:
  L

     open all    |    close all

Games/Demos:
  M

     open all    |    close all

Third Party Libraries:
  P
  F
  Z

     open all    |    close all

Information about this Website / Informationen zu dieser Webseite:
In case of any questions, or comments, please feel free to contact me via email at apoll500@gmail.com.

Module istatus [Version: v01]

This documentation describes the Prokee module interface.


Static Methods:
checkStatus16
uint16_t istatus::checkStatus16(uint16_t *st,uint16_t m)
packStatus16
uint16_t istatus::packStatus16(uint16_t *st,uint16_t m)
sepStatus16
uint16_t istatus::sepStatus16(uint16_t *st,uint16_t status,uint16_t pos)
matchStatus
bool istatus::matchStatus(uint16_t *st,uint16_t n,uint16_t *needles)
setStatus
void istatus::setStatus(Element *elem,uint16_t event)
setStatusLink
void istatus::setStatusLink(Element *elem,uint16_t event,uint16_t old_status,uint16_t new_status)
updateStatusMatrix
void istatus::updateStatusMatrix(Element *elem,uint16_t max_event,uint16_t max_status)

Motivation


Static Methods

   checkStatus16


Der Pointer st zeigt auf m uint16_t Werte. Die Funktion entfernt doppelte Einträge. Der Rückgabewert entspricht der Anzahl verbleibender Einträge.

Signature:
uint16_t istatus::checkStatus16(uint16_t *st,uint16_t m)

Parameters:
Type Name Direction Description
uint16_t *st[IN/OUT]
uint16_t m

   packStatus16


Der Pointer st zeigt auf m uint16_t Werte. Die Funktion entfernt zuerst doppelte Einträge. Anschließend werden die verbleibenden Einträge in einen einzigen uint16_t Wert gepackt und zurückgegeben. Dies funktioniert nur, wenn st nur wenige Werte enthält, die klein genug sind, sodass sie mit 16 Bits codiert werden können. Im Erfolgsfall wird dieser uint16_t Wert zurückgegeben. Anderenfalls gibt die Funktion den Wert 0x0FFF zurück.

Signature:
uint16_t istatus::packStatus16(uint16_t *st,uint16_t m)

Parameters:
Type Name Direction Description
uint16_t *st[IN/OUT]
uint16_t m

   sepStatus16


Der Parameter status enthält 16 Bits, welche einen oder mehrere Integers oder einen Fehlerzustand codieren. Die Funktion decodiert den status und trägt die einzelnen Integer Werte in st ab Indexposition pos ein. Der Rückgabewert entspricht der Anzahl an Einträgen in st nach den Einfügeoperationen. Der Speicher für st muss ausreichend groß alloziert sein.

Signature:
uint16_t istatus::sepStatus16(uint16_t *st,uint16_t status,uint16_t pos)

Parameters:
Type Name Direction Description
uint16_t *st[IN/OUT]
uint16_t status
uint16_t pos

   matchStatus


Der Pointer st zeigt auf n Integer Werte. neddles zeigt auf eine Folge von Integer Werten, welche 0x0FFE-terminiert sind. D.h. der letzte Wert lautet 0x0FFE. (Analog zu null-terminierten Strings, darf nicht über den Wert 0x0FFE hinaus gelesen werden.) Die Funktion prüft, ob ein Wert aus needles in st vorkommt. Falls dem so ist, wird true, sonst false zurückgegeben.

Signature:
bool istatus::matchStatus(uint16_t *st,uint16_t n,uint16_t *needles)

Parameters:
Type Name Direction Description
uint16_t *st[IN]
uint16_t n
uint16_t *needles[IN]

   setStatus


Updates the status of the element according to the current status and interaction-event.

Signature:
void istatus::setStatus(Element *elem,uint16_t event)

Parameters:
Type Name Direction Description
Element *elem[IN/OUT]Pointer to an Element structure.
uint16_t eventa user interaction event

   updateStatusMatrix


Updates the size of allocated memory for the interaction status matrix. (This performs malloc or realloc, if a larger matrix is required.)

Signature:
void istatus::updateStatusMatrix(Element *elem,uint16_t max_event,uint16_t max_status)

Parameters:
Type Name Direction Description
Element *elem[IN/OUT]Pointer to an Element structure.
uint16_t max_eventmax. number of events
uint16_t max_statusmax. number of states


Copyright © 2017 - 2019 by Andreas Pollhammer