libmoldeo (Moldeo 1.0 Core)  1.0
libmoldeo is the group of objects and functions that executes the basic operations of Moldeo 1.0 Platform.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
moActions.h File Reference
#include "moTypes.h"
#include "moValue.h"
#include <iostream>
#include <map>
#include <string>

Go to the source code of this file.

Classes

class  moAction
 
class  moReaction
 
class  moReactionListener
 
class  moReactionListenerManager
 

Macros

#define MO_ACTION_LISTENER_HOST_UNDEFINED   127.0.0.1
 
#define MO_ACTION_LISTENER_PORT_UNDEFINED   7777
 
#define MO_ACTION_MOLDEOAPI_EVENT_SEND   333
 
#define MO_ACTION_MOLDEOAPI_EVENT_RECEIVE   444
 

Typedefs

typedef std::map< std::string,
moAction
TMapStrToAction
 
typedef std::map< std::string,
int > 
TMapStrToActionType
 

Enumerations

enum  moMoldeoActionType {
  MO_ACTION_UNDEFINED = -1, MO_ACTION_VALUE_ADD = 100, MO_ACTION_VALUE_DELETE, MO_ACTION_VALUE_SAVE,
  MO_ACTION_VALUE_REFRESH, MO_ACTION_VALUE_SET, MO_ACTION_VALUE_GET, MO_ACTION_VALUE_GETCOMPUTED,
  MO_ACTION_PARAM_GET, MO_ACTION_PARAM_SET, MO_ACTION_PARAM_SAVE, MO_ACTION_PRECONFIG_ADD,
  MO_ACTION_PRECONFIG_DELETE, MO_ACTION_PRECONFIG_SAVE, MO_ACTION_PRECONFIG_SET, MO_ACTION_OBJECT_ADD,
  MO_ACTION_OBJECT_DUPLICATE, MO_ACTION_OBJECT_IMPORT, MO_ACTION_OBJECT_GET, MO_ACTION_OBJECT_GETSTATE,
  MO_ACTION_OBJECT_GETCONFIG, MO_ACTION_OBJECT_GETPRECONFIG, MO_ACTION_OBJECT_GETPRECONFIGS, MO_ACTION_OBJECT_SAVE,
  MO_ACTION_OBJECT_SET, MO_ACTION_OBJECT_DELETE, MO_ACTION_OBJECT_MOVE, MO_ACTION_OBJECT_ENABLE,
  MO_ACTION_OBJECT_DISABLE, MO_ACTION_OBJECT_TOGGLE, MO_ACTION_EFFECT_ENABLE, MO_ACTION_EFFECT_DISABLE,
  MO_ACTION_EFFECT_SETSTATE, MO_ACTION_EFFECT_GETSTATE, MO_ACTION_EFFECT_PLAY, MO_ACTION_EFFECT_STOP,
  MO_ACTION_EFFECT_PAUSE, MO_ACTION_EVENT_ADD, MO_ACTION_CONSOLE_PLAY, MO_ACTION_CONSOLE_PLAY_SESSION,
  MO_ACTION_CONSOLE_RECORD_SESSION, MO_ACTION_CONSOLE_RENDER_SESSION, MO_ACTION_CONSOLE_SAVE_SESSION_AS, MO_ACTION_CONSOLE_PAUSE,
  MO_ACTION_CONSOLE_STOP, MO_ACTION_CONSOLE_SAVE, MO_ACTION_CONSOLE_SAVEAS, MO_ACTION_CONSOLE_SCREENSHOT,
  MO_ACTION_CONSOLE_PREVIEW_SHOT, MO_ACTION_CONSOLE_PRESENTATION, MO_ACTION_CONSOLE_FULLSCREEN, MO_ACTION_CONSOLE_FULLSCREEN_SECONDARY,
  MO_ACTION_CONSOLE_WINDOWED, MO_ACTION_CONSOLE_RESET, MO_ACTION_CONSOLE_GET, MO_ACTION_CONSOLE_GETSTATE,
  MO_ACTION_CONSOLE_SETSTATE, MO_ACTION_CONSOLE_PRESET_ADD, MO_ACTION_CONSOLE_PRESET_DELETE, MO_ACTION_CONSOLE_PRESET_SAVE,
  MO_ACTION_CONSOLE_PRESET_SET, MO_ACTION_LISTEN_TO_REACTIONS, MO_ACTION_STOP_LISTENING_TO_REACTIONS
}
 moMoldeoActionType More...
 
enum  moMoldeoReactionType {
  MO_REACTION_UNDEFINED = -1, MO_REACTION_VALUE_UPDATED = 500, MO_REACTION_VALUE_ERROR, MO_REACTION_PARAM_UPDATED,
  MO_REACTION_PARAM_ERROR, MO_REACTION_OBJECT_UPDATED, MO_REACTION_OBJECT_ERROR, MO_REACTION_CONSOLE_UPDATED,
  MO_REACTION_CONSOLE_ERROR
}
 

Functions

 moDeclareExportedDynamicArray (moReactionListener *, moReactionListeners)
 

Macro Definition Documentation

#define MO_ACTION_LISTENER_HOST_UNDEFINED   127.0.0.1

Definition at line 43 of file moActions.h.

#define MO_ACTION_LISTENER_PORT_UNDEFINED   7777

Definition at line 44 of file moActions.h.

#define MO_ACTION_MOLDEOAPI_EVENT_RECEIVE   444

Definition at line 47 of file moActions.h.

#define MO_ACTION_MOLDEOAPI_EVENT_SEND   333

Definition at line 46 of file moActions.h.

Typedef Documentation

typedef std::map< std::string, moAction > TMapStrToAction

Definition at line 797 of file moActions.h.

typedef std::map< std::string, int> TMapStrToActionType

Definition at line 798 of file moActions.h.

Enumeration Type Documentation

moMoldeoActionType

Tipos de acciones de la API de Moldeo.

Estas acciones pueden ser disparadas de dos formas:

Eventos: publicando un evento en el IODeviceManager -> EventsList o bien enviando por OSC al plugin de NetOscIn un mensaje formateado:

Moldeo OSC API 1.0 , a través de habilitar el plugin (IODevice) "netoscin" : /moldeo/mensaje/parametro 1/parametro 2/parametro 3/parametro 4...

Enumerator
MO_ACTION_UNDEFINED 
MO_ACTION_VALUE_ADD 

"valueadd" > MO_ACTION_VALUE_ADD

Agrega un valor a un parámetro Al definir el value index como -1, se agrega al final Al definir un value index como 0 o N, se inserta antes de ese valor

param 1: object name | object id param 2: parameter name | parameter id param 3: -1 | value index | value index:sub value index param 4: new value

MO_ACTION_VALUE_DELETE 

"valuedelete" > MO_ACTION_VALUE_DELETE

add a value to existing param ( objectname|objectid, paramname|paramid, defaultvalue ) Elimina un valor de un parámetro

param 1: object name | object id param 2: parameter name | parameter id param 3: value index | value index:sub value index

MO_ACTION_VALUE_SAVE 

"valuesave" > MO_ACTION_VALUE_SAVE

delete a value from existing param ( objectname|objectid, paramname|paramid ) Guarda físicamente el valor de un parámetro en el config en disco

param 1: object name | object id param 2: parameter name | parameter id param 3: value index | value index:sub value index

MO_ACTION_VALUE_REFRESH 

"valuerefresh" > MO_ACTION_VALUE_REFRESH

save a value ( objectname|objectid, paramname|paramid, valueid, value ) Envia un mensaje para volver a cargar un valor de su origen. Si se trata del parámetro de una textura, este comando hará que la imagen se vuelva a cargar.

param 1: object name | object id param 2: parameter name | parameter id param 3: value index | value index:sub value index

MO_ACTION_VALUE_SET 

"valueset" > MO_ACTION_VALUE_SET

refresh a value ( objectname|objectid, paramname|paramid, valueid, value ) Fija un valor

param 1: object name | object id param 2: parameter name | parameter id param 3: value index | value index:sub value index param 4: new value

MO_ACTION_VALUE_GET 

"valueget" > MO_ACTION_VALUE_GET

set the index of a value ( objectname|objectid, paramname|paramid, valueid, indexvalue ) Obtiene un valor

param 1: object name | object id param 2: parameter name | parameter id param 3: value index | value index:sub value index

MO_ACTION_VALUE_GETCOMPUTED 

"valueget" > MO_ACTION_VALUE_GET

get the index of a value ( objectname|objectid, paramname|paramid, valueid ) Obtiene el mismo valor pero evaluado

param 1: object name | object id param 2: parameter name | parameter id param 3: value index | value index:sub value index

MO_ACTION_PARAM_GET 

"paramget" > MO_ACTION_PARAM_GET

get the fully computed value (in case of a function>use this one to know actual value!) ( objectname|objectid, paramname|paramid, valueid ) MO_ACTION related to PARAMETERS Obtiene un parametro: definición y configuración

param 1: object name | object id param 2: parameter name | parameter id

MO_ACTION_PARAM_SET 

"paramset" > MO_ACTION_PARAM_SET

( objectname|objectid, paramname|paramid ) > Retreive full info of a parameters ( name, type and all values) Fijar un parámetro: definición y configuración

param 1: object name | object id param 2: parameter name | parameter id param 3: paremeter info { "": "", "": "", "": "" }

MO_ACTION_PARAM_SAVE 

"paramsave" > MO_ACTION_PARAM_SAVE

( objectname|objectid, paramname|paramid, paraminfo ) > if passed name/type doest affect, but can be affected by 'interpolation' and 'duration', 'position' !! Guardar la info completa de un parámetro en el archivo de configuración

param 1: object name | object id param 2: parameter name | parameter id

MO_ACTION_PRECONFIG_ADD 

"preconfigadd" > MO_ACTION_PRECONFIG_ADD

( objectname|objectid, paramname|paramid) > Save actual parameter to file !? Agregar una preconfiguración

param 1: object name | object id param 2: parameter name | parameter id param 3: preconfig info

MO_ACTION_PRECONFIG_DELETE 

"preconfigdelete" > MO_ACTION_PRECONFIG_DELETE

add a preconfig set to object ( uses actual param's value position ) ( objectname|objectid, paramname|paramid, preconfigname ) Eliminar una preconfiguración

param 1: object name | object id param 2: parameter name | parameter index param 3: preconfig name | preconfig index

MO_ACTION_PRECONFIG_SAVE 

"preconfigsave" > MO_ACTION_PRECONFIG_SAVE

delete a preconfig set ( objectname|objectid, paramname|paramid, preconfigname ) Eliminar una preconfiguración

param 1: object name | object id param 2: parameter name | parameter index param 3: preconfig name | preconfig index

MO_ACTION_PRECONFIG_SET 

"preconfigset" > MO_ACTION_PRECONFIG_SET

save a preconfig set ( objectname|objectid, paramname|paramid, preconfigname ) Fijar una preconfiguración

param 1: object name | object id param 2: parameter name | parameter index param 3: preconfig name | preconfig index param 4: preconfig info

MO_ACTION_OBJECT_ADD 

"objects add" > MO_ACTION_OBJECTS_ADD

set a preconfig set ( objectname|objectid, paramname|paramid, preconfigame ) Agregar un objeto. El primer parámetro define el punto de anclaje para este objeto. si es "console" o -1. Lo agregará en el objeto consola. si es "escena xxx" o id>=101 entonces se trata de algun objeto donde agregar el objeto solo se puede agregar un fx object a una escena, en cambio en una consola se pueden agregar todas las categorías de objetos ( fx, resource, iodevice )

param 1: father object name | id param 3: object info

MO_ACTION_OBJECT_DUPLICATE 

1: father object name | id, 2: object info

"objectduplicate" : MO_ACTION_OBJECT_DUPLICATE Duplicar un objeto

param 1: object name | object id

MO_ACTION_OBJECT_IMPORT 

1: object name | id

"objectimport" : MO_ACTION_OBJECT_IMPORT Importar un objeto

param 1: config full file path

MO_ACTION_OBJECT_GET 

1: config full file path

"objectget" : MO_ACTION_OBJECT_GET Obtener la info completa de un objeto

param 1: object name | object id

MO_ACTION_OBJECT_GETSTATE 

"objectgetstate" : OBJECT_GETSTATE

Obtener el estado completo de un objeto

param 1: object name | object id

MO_ACTION_OBJECT_GETCONFIG 

"objectget" : MO_ACTION_OBJECT_GETCONFIG

Obtener la info completa de la configuración de un objeto

param 1: object name | object id

MO_ACTION_OBJECT_GETPRECONFIG 

"objectgetpreconfig" : MO_ACTION_OBJECT_GETPRECONFIG

Obtener la info completa de una preconfiguración

param 1: object name | object id param 2: preconfig index

MO_ACTION_OBJECT_GETPRECONFIGS 

"objectgetpreconfig" : MO_ACTION_OBJECT_GETPRECONFIG

Obtener la info completa de todas las preconfiguraciones

param 1: object name | object id

MO_ACTION_OBJECT_SAVE 

"objectsave" : MO_ACTION_OBJECT_SAVE

Guardar el objeto completo en el archivo de configuración

param 1: object name | object id

MO_ACTION_OBJECT_SET 

"objectset" : MO_ACTION_OBJECT_SET

EDITOR Asignar uno o varios valores al estado y la configuración

param 1: object name | object id param 2: object info {}

MO_ACTION_OBJECT_DELETE 

test

"objectset" : MO_ACTION_OBJECT_DELETE Eliminar un objeto

param 1: object name | object id

MO_ACTION_OBJECT_MOVE 

param 1: object name | object id

"objetmove" : MO_ACTION_OBJECT_MOVE Mover un objeto de posición en la consola si el param 3 corresponde a una posición ya ocupada, la desplaza hacia arriba.

param 1: object name | object id param 1: new father object name | new father object id param 3: new object position index

MO_ACTION_OBJECT_ENABLE 

"objetenable" : MO_ACTION_OBJECT_ENABLE

Activar un objeto

param 1: object name | object id

MO_ACTION_OBJECT_DISABLE 

"objetdisable" : MO_ACTION_OBJECT_DISABLE

Desactivar un objeto

param 1: object name | object id

MO_ACTION_OBJECT_TOGGLE 

param 1: object name | object id

"objecttoggle" : MO_ACTION_OBJECT_TOGGLE Activa/Desactiva un objeto

param 1: object name | object id

MO_ACTION_EFFECT_ENABLE 

param 1: object name | object id

"effectenable" : MO_ACTION_EFFECT_ENABLE Activar un efecto

param 1: effect label name | effect id

MO_ACTION_EFFECT_DISABLE 

param 1: effect label name | effect id

"effectdisable" : MO_ACTION_EFFECT_DISABLE Desactivar un efecto

param 1: effect label name | effect id

MO_ACTION_EFFECT_SETSTATE 

param 1: effect label name | effect id

"effectsetstate" : MO_ACTION_EFFECT_SETSTATE Fijar el estado de un efecto

param 1: effect name | object id param 2: new effect info state

MO_ACTION_EFFECT_GETSTATE 

"effectgetstate" : MO_ACTION_EFFECT_SETSTATE

Obtiene el estado completo de un efecto

param 1: effect name | object id

return: new effect info state

MO_ACTION_EFFECT_PLAY 

"effectplay" : MO_ACTION_EFFECT_PLAY

Activa el reloj del efecto

param 1: effect name | object id

MO_ACTION_EFFECT_STOP 

"effectstop" : MO_ACTION_EFFECT_STOP

Para el reloj del efecto

param 1: effect name | object id

MO_ACTION_EFFECT_PAUSE 

"effectpause" : MO_ACTION_EFFECT_PAUSE

Pausa el reloj del efecto

param 1: effect name | object id

MO_ACTION_EVENT_ADD 

"eventadd" : MO_ACTION_EVENT_ADD

Agrega un evento a la cola de eventos

param 1: event info

MO_ACTION_CONSOLE_PLAY 

param 1: event info

"consoleplay" : MO_ACTION_CONSOLE_PLAY Activa el reloj de la consola

MO_ACTION_CONSOLE_PLAY_SESSION 

"consoleplaysession" : MO_ACTION_CONSOLE_PLAY_SESSION

Play a recorded session

MO_ACTION_CONSOLE_RECORD_SESSION 

"consolerecordsession" : MO_ACTION_CONSOLE_RECORD_SESSION

Record a live session

MO_ACTION_CONSOLE_RENDER_SESSION 

"consolerendersession" : MO_ACTION_CONSOLE_RECORD_SESSION

Render a recorded session

MO_ACTION_CONSOLE_SAVE_SESSION_AS 

"consolesavesessionas" : MO_ACTION_CONSOLE_SAVE_SESSION_AS

Save a recorded session as a xml file

MO_ACTION_CONSOLE_PAUSE 

"consolepause" : MO_ACTION_CONSOLE_PAUSE

Pausa el reloj de la consola

MO_ACTION_CONSOLE_STOP 

"consolestop" : MO_ACTION_CONSOLE_STOP

Para el reloj de la consola

MO_ACTION_CONSOLE_SAVE 

"consolesave" : MO_ACTION_CONSOLE_SAVE

Salva la configuración de la consola en su archivo de configuración (.mol)

MO_ACTION_CONSOLE_SAVEAS 

"consolesaves" : MO_ACTION_CONSOLE_SAVEAS

Salva la configuración de la consola en su archivo de configuración (.mol)

param 1: new location path and .mol name

MO_ACTION_CONSOLE_SCREENSHOT 

"consolescreenshot" : MO_ACTION_CONSOLE_SCREENSHOT

Captura una imagen de pantalla y la guarda en la carpeta de screenshots del proyecto

param 1: new location path for screenshots

return: image path ( C:\molproject\moldeo_screenshots\01-02-1410:00:01.png )

MO_ACTION_CONSOLE_PREVIEW_SHOT 

"consolepreviewshot" : MO_ACTION_CONSOLE_PREVIEW_SHOT

Captura una secuencia de 4 imágenes y las guarda en la carpeta del proyecto asignando estas en el parámetro "previews". Una vez definidas estas servirán para la previsualización del proyecto.

param 1: new location path for screenshots

return: image path ( C:\molproject\moldeo_screenshots\01-02-1410:00:01.png )

MO_ACTION_CONSOLE_PRESENTATION 

"consolepresentation" : MO_ACTION_CONSOLE_PRESENTATION

Señal de cambiar de modo de presentación: fullscreen, fullscreen_secondary, windowed

MO_ACTION_CONSOLE_FULLSCREEN 

Señal de cambiar de modo de presentación: fullscreen, fullscreen_secondary, windowed.

"consolefullscreen" : MO_ACTION_CONSOLE_FULLSCREEN Pasar el modo de presentación a pantalla completa

MO_ACTION_CONSOLE_FULLSCREEN_SECONDARY 

"consolefullscreensecondary" : MO_ACTION_CONSOLE_FULLSCREEN_SECONDARY

Pasar el modo de presentación a pantalla completa en el segundo monitor

MO_ACTION_CONSOLE_WINDOWED 

"consolewindowed" : MO_ACTION_CONSOLE_WINDOWED

Pasar el modo de presentación a ventana

MO_ACTION_CONSOLE_RESET 

"consolereset" : MO_ACTION_CONSOLE_RESET

TODO: Reset ?? Reinicia el modo de pantalla y el proyecto???

MO_ACTION_CONSOLE_GET 

"consoleget" : MO_ACTION_CONSOLE_GET

Obtiene la info completa de la consola

return: full console info (state+config) (json format)

MO_ACTION_CONSOLE_GETSTATE 

"consolegetstate" : MO_ACTION_CONSOLE_GETSTATE

Obtiene la info completa de la consola: state + config

return: full console state

MO_ACTION_CONSOLE_SETSTATE 

"consolesetstate" : MO_ACTION_CONSOLE_SETSTATE

Fija el estado de la consola

param 1: full console state

MO_ACTION_CONSOLE_PRESET_ADD 

"consolepresetadd" : MO_ACTION_CONSOLE_PRESET_ADD

Agregar un preset a la consola

param 1: preset position index | -1 param 2: preset info

MO_ACTION_CONSOLE_PRESET_DELETE 

"consolepresetdelete" : MO_ACTION_CONSOLE_PRESET_DELETE

Eliminar un preset a la consola

param 1: preset position index | -1

MO_ACTION_CONSOLE_PRESET_SAVE 

"consolepresetsave" : MO_ACTION_CONSOLE_PRESET_SAVE

Guardar el preset en el archivo de configuración si se elige -1, guarda todos los presets en memoria en el archivo

param 1: preset position index | -1

MO_ACTION_CONSOLE_PRESET_SET 

"consolepresetset" : MO_ACTION_CONSOLE_PRESET_SET

Fija un preset

param 1: preset position index | -1 param 2: new preset info

MO_ACTION_LISTEN_TO_REACTIONS 

Subscribe specific connection to receive REACTION MESSAGES

MO_ACTION_STOP_LISTENING_TO_REACTIONS 

( hostname|ipname, portname|portnumber, actiontypename|actiontypeid, objectname|objectid, paramname|paramid ) ( hostname|ipname, portname|portnumber, objectname|objectid, paramname|paramid )

Definition at line 64 of file moActions.h.

Enumerator
MO_REACTION_UNDEFINED 
MO_REACTION_VALUE_UPDATED 

specified value of some object was updated

MO_REACTION_VALUE_ERROR 

( objectname|objectid, paramname|paramid, valuename|valueid, { FULL VALUE INFO } )

MO_REACTION_PARAM_UPDATED 

specified parameter of some object was updated (a param has changed a property/add or deletion of inner values )

MO_REACTION_PARAM_ERROR 

( objectname|objectid, paramname|paramid, { FULL PARAM INFO } )

MO_REACTION_OBJECT_UPDATED 

specified object was updated, (params were added ?! label of object was changed )

MO_REACTION_OBJECT_ERROR 

( objectname|objectid, { FULL OBJECT INFO } )

MO_REACTION_CONSOLE_UPDATED 

console has to be fully reloaded ( objects are added, moved or removed )

MO_REACTION_CONSOLE_ERROR 

( )

Definition at line 726 of file moActions.h.

Function Documentation

moDeclareExportedDynamicArray ( moReactionListener ,
moReactionListeners   
)