new Session(id, mgr, settings, bindings)
Session Class Constructor function
Parameters:
Name | Type | Description |
---|---|---|
id |
String | The id for this session, used for access and naming |
mgr |
Object | The owning FVSessions.Manager object |
settings |
Object | The source properties including connection which has connection details |
bindings |
Object | Any event/call forwarders |
- Source:
Methods
FVSESS.BindNewSession(fvApi, sessionKey)
Internal function that binds the FVTermParent events to the client's onnewscreen,
onclose, onsend and onalert (when each handler is present) in support of the FVTermMsgApi.js module
implemented September of 2023, this function is flagged async as the fvApi.GetCookieEx must run
with an await to retain synchronicity in the messaging environment.
Parameters:
Name | Type | Description |
---|---|---|
fvApi |
Object | Api Control Object |
sessionKey |
String | SessionKey if for active session |
- Source:
FVSESS.Close()
Close the Session if active
- Source:
FVSESS.EnterScreen(enterKeys, onComplete)
Enter the active screen using a hllapi string
Parameters:
Name | Type | Description |
---|---|---|
enterKeys |
String | Should be one or more keys with an enter/function/action key at the end like @E or @C ([enter] or [clear] or @T for Tabbing with ASCII host) |
onComplete |
function | Optional completion function for when the screen has been entered |
- Source:
FVSESS.GetScreenText(row, column, length) → {String}
Read from the active screen--will trim blanks from the text that is read--
Note that for MsgAPI you need to await this call to get the right value
Parameters:
Name | Type | Description |
---|---|---|
row |
Integer | Row to read from where 1 is the first row |
column |
Integer | Column to read from where 1 is the first column |
length |
Integer | Length to read--if row/column is entry field this is ignored |
- Source:
Returns:
Text from the screen at row, column for length
- Type
- String
FVSESS.GetSessionKey() → {String}
Get the current session key from local storage
- Source:
Returns:
Sessionkey or null if not found
- Type
- String
FVSESS.SaveSessionKey(sessionKey)
Save a sessionKey for this session to local storage
Parameters:
Name | Type | Description |
---|---|---|
sessionKey |
String | SessionKey to save -- if null, the localstorage will be cleared |
- Source:
FVSESS.SetField(text, row, column) → {Boolean}
Set a field's value for MsgAPI use await to ensure synchronous operation
Parameters:
Name | Type | Description |
---|---|---|
text |
String | Text to set into an unprotected entry field on the screen |
row |
integer | Row to set the text on starting with 1 |
column |
integer | Column to set thet ext on starting with 1 |
- Source:
Returns:
Function succeeded (MsgAPI only)
- Type
- Boolean
FVSESS.SetFocus(focusOn, activate) → {Promise}
Control if the session has focus - Note for MsgAPI need to await this if you want it
to be synchronous
Parameters:
Name | Type | Description |
---|---|---|
focusOn |
boolean | If true the session will have focus set, if false, focus will be off and locked off until |
activate |
boolean | If true, when focusOn is true, will also set browser focus into the FVTerm body set back on with this call |
- Source:
Returns:
For MsgAPI returns a Promise
- Type
- Promise
FVSESS.SetStatus(newStatus)
Set the status of the Session
Parameters:
Name | Type | Description |
---|---|---|
newStatus |
String | Status which includes offline, started (needs logon) and ready (not on any logon screens) |
- Source:
FVSESS.SplitKeys(text) → {Object}
Split keys so that hllapi enters and function keys break into individual objects --
NOT SUPPORTED for MsgAPI=true
Parameters:
Name | Type | Description |
---|---|---|
text |
String | Hllapi string with @ mnemonics (not [enter] style for now!) |
- Source:
Returns:
Array of strings where each has keys ending with an AID (enter/function)
- Type
- Object
FVSESS.Transactions(transactions, onComplete, bubble)
Send a set of keys to the session, should end with Enter or Function key
Parameters:
Name | Type | Description |
---|---|---|
transactions |
String | Transactions to run separated by the vertical bar (|) -- grammar for each transaction:
|
onComplete |
function | Optional completion function for when the transactions are completed |
bubble |
boolean | Set true for screen updates to be bubbled to the onload |
- Source:
FVSESS.TypeAtRowCol(text, row, column)
Type text starting at a row and column - if length of text exceeds first field will autoskip to next
NOT SUPPORTED FOR MsgAPI=true
Parameters:
Name | Type | Description |
---|---|---|
text |
String | Text to type into unprotected entry field(s) on the screen |
row |
integer | Row to type the text on starting with 1 |
column |
integer | Column to type the text on starting with 1 |
- Source:
FVSESS.TypeKeys(text, screenWaiter) → {boolean}
Type HLLAPI string starting at current row and column
NOT SUPPORTED for MsgAPI=true
Parameters:
Name | Type | Description |
---|---|---|
text |
String | Text to type into unprotected entry field(s) on the screen, can include @T for tab and end with @E or other AID string, which will be sent to the host for processing |
screenWaiter |
function | Provides callback instead of onLoad |
- Source:
Returns:
Keys were typed OK
- Type
- boolean
FVSessions.SetLocalMethods()
Internal use only function used to set functions when FVSessions.config.msgAPI is false
- Source:
FVSessions.SetMsgMethods()
Internal use only function used to set functions when FVSessions.config.msgAPI is true
- Source: