loadIPCInMemoryTable
Syntax
loadIPCInMemoryTable(tableName)
Arguments
tableName is a STRING indicating the name of IPC in-memory table to be loaded.
Details
Load an IPC in-memory table and return its handle.
Examples
// Create an IPC in-memory table that serves as the output table for subscription.
share streamTable(10000:0,`timestamp`temperature, [TIMESTAMP,DOUBLE]) as pubTable
ipc_t = createIPCInMemoryTable(1000000, "ipc_table", `timestamp`temperature, [TIMESTAMP, DOUBLE])
def shm_append(mutable table, msg) {
table.append!(msg)
}
subscribeTable(tableName="pubTable", actionName="act3", offset=0, handler=shm_append{ipc_t}, msgAsTable=true)
/ data input
n = 200
timestamp = 2022.01.01T09:00:00.000 + 1..n
temp = 30 + rand(5.0,n)
tableInsert(shm_test,timestamp,temp)
tableInsert(pubTable,timestamp,temp)
//Load table ipc_table
$ ipc_t = loadIPCInMemoryTable("ipc_table")
$ ipc_t
timestamp temperature