Skip to main content

NativeRpmsgHelper Class

Package: GHIElectronics.Endpoint.Core
Namespace: GHIElectronics.Endpoint.Core

Low-level helper used by other libraries to talk to the firmware's hardware timing helper. Data is exchanged as 32-bit words in fixed-size blocks of NativeRpmsgHelper.BlockSize words. Most applications never call this directly; Core.EPM815-based classes such as DigitalSignalController use it internally.

public static class NativeRpmsgHelper

Nested Types​

TypeKindSummary
NativeRpmsgHelper.DataReceivedEventHandlerDelegateSignature for the NativeRpmsgHelper.DataReceived event.

Properties​

BlockDelay​

public static int BlockDelay { get; set; }

Delay in milliseconds between consecutive NativeRpmsgHelper.Send blocks (default 5).

Returns int

BlockSize​

public static int BlockSize { get; }

Number of 32-bit words in one message block (64).

Returns int

Methods​

Acquire()​

public static int Acquire()

Opens the helper endpoint and reserves it for this process. Call before NativeRpmsgHelper.Send or NativeRpmsgHelper.StartReceiving.

Returns int: Zero on success, a negative error code otherwise.

Ping()​

public static int Ping()

Sends a ping message to the remote core and waits for a reply, as a quick link check.

Returns int: Zero when the remote responds, a negative error code otherwise.

Release()​

public static int Release()

Releases the helper endpoint previously opened by NativeRpmsgHelper.Acquire.

Returns int: Zero on success, a negative error code otherwise.

Send(uint[] data, int offset, int count)​

public static int Send(uint[] data, int offset, int count)

Sends count 32-bit words from data starting at offset. The transfer is split into blocks of NativeRpmsgHelper.BlockSize words with NativeRpmsgHelper.BlockDelay milliseconds between blocks.

Returns int: The number of words actually written.

StartReceiving()​

public static Task StartReceiving()

Starts the background receive loop. The loop reads whole messages from the helper endpoint and raises NativeRpmsgHelper.DataReceived for each. Safe to call more than once: only the first call starts a loop; subsequent calls return a completed task.

Returns Task

Events​

DataReceived​

public static event DataReceivedEventHandler DataReceived

Raised from the receive loop started by NativeRpmsgHelper.StartReceiving.