PineForge v1.5.0-rc.1-1-g4e01e96b
Deterministic PineScript v6 backtest runtime — C ABI reference
Loading...
Searching...
No Matches
selected_window_plan.h File Reference
#include <stdint.h>
#include <pineforge/pineforge.h>
Include dependency graph for selected_window_plan.h:

Go to the source code of this file.

Data Structures

struct  pf_selected_plan_request_v1
 One selected-window planning request. More...
 
struct  pf_selected_plan_result_v1
 One complete planner result, plain data, written whole by a successful call. More...
 

Functions

uint32_t pf_selected_plan_version (void)
 Returns the selected-planner C bridge version, 1.
 
int pf_plan_selected_primary_v1 (const pf_selected_plan_request_v1 *, const pf_bar_t *rows, uint64_t count, pf_selected_plan_result_v1 *)
 Plans the primary rows of one selected-window request.
 

Function Documentation

◆ pf_selected_plan_version()

uint32_t pf_selected_plan_version ( void )

Returns the selected-planner C bridge version, 1.

References PF_API.

◆ pf_plan_selected_primary_v1()

int pf_plan_selected_primary_v1 ( const pf_selected_plan_request_v1 * ,
const pf_bar_t * rows,
uint64_t count,
pf_selected_plan_result_v1 *  )

Plans the primary rows of one selected-window request.

Returns 0 when one whole result was written to *out, INCLUDING every planner refusal (a refusal is carried in out->status, never in the return value). Returns -1 for a NULL request or output, a wrong struct_size or version in either descriptor, a NULL string pointer, a feed_tolerant other than 0 or 1, or a count that does not fit size_t; -2 when memory could not be allocated; -3 for any other bridge failure or broken bridge invariant (for example a planner option longer than 31 characters, which is never truncated). On every negative return a valid caller output is byte-unchanged.

rows may be NULL only with count 0. A NULL rows with a positive count is not dereferenced by the bridge: the planner refuses it as RequestInvalid. The bridge builds a local result and commits it to *out with one assignment, calls no host or library callback, and lets no exception cross C.

References PF_API.