#include <gtopt/json/json_battery.hpp>
template<>
json_data_contract<Battery> struct
Public types
-
using type = json_member_list<json_number<"uid", Uid>, json_string<"name", Name>, json_variant_null<"active", OptActive, jvtl_
Active>, json_string_null<"type", OptName>, json_variant_null<"bus", OptSingleId, jvtl_ SingleId>, json_variant_null<"source_generator", OptSingleId, jvtl_ SingleId>, json_variant_null<"input_efficiency", OptTRealFieldSched, jvtl_ TRealFieldSched>, json_variant_null<"output_efficiency", OptTRealFieldSched, jvtl_ TRealFieldSched>, json_variant_null<"annual_loss", OptTRealFieldSched, jvtl_ TRealFieldSched>, json_variant_null<"emin", OptTRealFieldSched, jvtl_ TRealFieldSched>, json_variant_null<"emax", OptTRealFieldSched, jvtl_ TRealFieldSched>, json_variant_null<"ecost", OptTRealFieldSched, jvtl_ TRealFieldSched>, json_number_null<"eini", OptReal>, json_number_null<"efin", OptReal>, json_variant_null<"soft_emin", OptTRealFieldSched, jvtl_ TRealFieldSched>, json_variant_null<"soft_emin_cost", OptTRealFieldSched, jvtl_ TRealFieldSched>, json_variant_null<"pmax_charge", OptTRealFieldSched, jvtl_ TRealFieldSched>, json_variant_null<"pmax_discharge", OptTRealFieldSched, jvtl_ TRealFieldSched>, json_variant_null<"gcost", OptTRealFieldSched, jvtl_ TRealFieldSched>, json_variant_null<"capacity", OptTRealFieldSched, jvtl_ TRealFieldSched>, json_variant_null<"expcap", OptTRealFieldSched, jvtl_ TRealFieldSched>, json_variant_null<"expmod", OptTRealFieldSched, jvtl_ TRealFieldSched>, json_variant_null<"capmax", OptTRealFieldSched, jvtl_ TRealFieldSched>, json_variant_null<"annual_capcost", OptTRealFieldSched, jvtl_ TRealFieldSched>, json_variant_null<"annual_derating", OptTRealFieldSched, jvtl_ TRealFieldSched>, json_bool_null<"use_state_variable", OptBool>, json_bool_null<"daily_cycle", OptBool>, json_number_null<"energy_scale", OptReal>> - Member list defining the JSON-to-C++ field mapping.
Public static functions
- static auto to_json_data(Battery const& battery) -> auto constexpr
- Converts a Battery object to a tuple for JSON serialization.
Function documentation
template<>
static auto daw:: json:: json_data_contract<Battery>:: to_json_data(Battery const& battery) constexpr
Converts a Battery object to a tuple for JSON serialization.
| Parameters | |
|---|---|
| battery | The Battery object to serialize |
| Returns | constexpr auto Tuple containing all battery members in the order defined in type |