Constructor
new module:EpmlCore(targets)
Creates a new Epml instance
Parameters:
| Name | Type | Description |
|---|---|---|
targets |
* |
- Source:
Methods
(static) addTargetConstructor(targetConstructor)
Adds a new target contructor
Parameters:
| Name | Type | Description | ||||||
|---|---|---|---|---|---|---|---|---|
targetConstructor |
TargetConstructor | Has many methods...
Properties
|
- Source:
(static) createTarget(targetSource) → {Object}
Takes a single target source and returns an array of target object
Parameters:
| Name | Type | Description |
|---|---|---|
targetSource |
any | Can be any target source for which a targetConstructor has been installed |
- Source:
Returns:
- Target object
- Type
- Object
(static) createTargets(targets) → {Array.<Object>}
Takes (a) target(s) and returns an array of target Objects
Parameters:
| Name | Type | Description |
|---|---|---|
targets |
Object | Array.<Object> |
- Source:
Returns:
- An array of target objects
- Type
- Array.<Object>
(static) handleMessage(strData, sendFn)
Takes data from an event and figures out what to do with it
Parameters:
| Name | Type | Description |
|---|---|---|
strData |
object | String data received from something like event.data |
sendFn |
function | Function used to send a message (JSON) to the |
- Source:
(static) prepareIncomingData(strData)
Prepares data for processing. Take JSON string and return object
Parameters:
| Name | Type | Description |
|---|---|---|
strData |
string | JSON data in string form |
- Source:
(static) prepareOutgoingData(data)
Last step before sending data. Turns it into a string (obj->JSON)
Parameters:
| Name | Type | Description |
|---|---|---|
data |
object |
- Source:
(static) registerPlugin(plugin)
Installs a plugin "globally". Every new and existing epml instance will have this plugin enabled
Parameters:
| Name | Type | Description |
|---|---|---|
plugin |
object | Epml plugin |
- Source:
registerPlugin(plugin)
Installs a plugin for only this instance
Parameters:
| Name | Type | Description |
|---|---|---|
plugin |
object | Epml plugin |
- Source:
Type Definitions
TargetConstructor
- Source: