NetworkConfiguration

相机网络配置(IPv4 模式和地址)。

NetworkConfigurationclass

Network configuration of a camera.

Public Functions

NetworkConfiguration()

Default constructor.

NetworkConfiguration( stdstring&const:: fileName)explicit

Construct NetworkConfiguration by loading from file.

stdstringserialize()const::

Serialize to a string.

See also fromSerialized. The returned string is formatted in YAML, and is compatible with the contents of files saved using save.

< Argstemplatetypename...>
NetworkConfiguration(Args& &...args)inlineexplicit

Constructor taking variadic number of arguments.

One or more descendant types can be provided. All types not provided will be set to their default value. The result is the same as default constructing NetworkConfiguration then invoking set(args).

The provided arguments must be descendants of NetworkConfiguration. These types can be provided:

< Argstemplatetypename...>
set(Args& &...args)inlinevoid

Set multiple arguments.

The method invokes set(arg) with each of the provided arguments.

The provided arguments must be descendants of NetworkConfiguration. These types can be provided:

< Argstemplatetypename...>
NetworkConfigurationcopyWith(Args& &...args)constinline

Returns a copy of this object with the given argument(s) set to the new value(s)

Creates a copy of this NetworkConfiguration object, then invokes set(args) on the copy, and finally returns the copy. This method does not modify the original object.

The provided arguments must be descendants of NetworkConfiguration. These types can be provided:

IPV4&ipv4()constinlineconst

Get IPV4.

IPV4&ipv4()inline

Get IPV4.

NetworkConfiguration&set( IPV4&const value)inline

Set IPV4.

NetworkConfiguration&set( IPV4Address&const:: value)inline

Set IPV4::Address.

NetworkConfiguration&set( IPV4Mode&const:: value)inline

Set IPV4::Mode.

NetworkConfiguration&set( IPV4SubnetMask&const:: value)inline

Set IPV4::SubnetMask.

< Ftemplatetypename>
forEach( F&const f)constinlinevoid

Run the given function on each direct member with the value of the member as parameter.

< Ftemplatetypename>
forEach( F&const f)inlinevoid

Run the given function on each direct member with the value of the member as parameter.

==operator( NetworkConfiguration&const other)constbool

Equality operator.

!=operator( NetworkConfiguration&const other)constbool

Inequality operator.

stdstringtoString()const::

Get the value as string.

save( stdstring&const:: fileName)constvoid

Save to the given file.

load( stdstring&const:: fileName)void

Load from the given file.

Public Static Functions

NetworkConfigurationfromSerialized( stdstring&const:: value)static

Construct a new NetworkConfiguration instance from a previously serialized string.

See also serialize.

Public Static Attributes

DataModelNodeTypenodeType=DataModelNodeTypegroupstaticconstexpr:: ::::

The type of this node.

path={}staticconstexprconstchar* ""

The full path for this value.

name={}staticconstexprconstchar* "NetworkConfiguration"

The name of this value.

static constexpr const char * description  { R"description(Network configuration of a camera)description" }

The description for this value.

Friends

stdostream&<<operator(stdostream&:: stream, NetworkConfiguration&const value)inlinefriend::

Operator to send the value as string to a stream.

IPV4class

IPv4 network configuration.

Public Functions

IPV4()

Default constructor.

< Argstemplatetypename...>
IPV4(Args& &...args)inlineexplicit

Constructor taking variadic number of arguments.

One or more descendant types can be provided. All types not provided will be set to their default value. The result is the same as default constructing IPV4 then invoking set(args).

The provided arguments must be descendants of IPV4. These types can be provided:

< Argstemplatetypename...>
set(Args& &...args)inlinevoid

Set multiple arguments.

The method invokes set(arg) with each of the provided arguments.

The provided arguments must be descendants of IPV4. These types can be provided:

< Argstemplatetypename...>
IPV4copyWith(Args& &...args)constinline

Returns a copy of this object with the given argument(s) set to the new value(s)

Creates a copy of this IPV4 object, then invokes set(args) on the copy, and finally returns the copy. This method does not modify the original object.

The provided arguments must be descendants of IPV4. These types can be provided:

Address&address()constinlineconst

Get Address.

Address&address()inline

Get Address.

IPV4&set( Address&const value)inline

Set Address.

Mode&mode()constinlineconst

Get Mode.

Mode&mode()inline

Get Mode.

IPV4&set( Mode&const value)inline

Set Mode.

SubnetMask&subnetMask()constinlineconst

Get SubnetMask.

SubnetMask&subnetMask()inline

Get SubnetMask.

IPV4&set( SubnetMask&const value)inline

Set SubnetMask.

< Ftemplatetypename>
forEach( F&const f)constinlinevoid

Run the given function on each direct member with the value of the member as parameter.

< Ftemplatetypename>
forEach( F&const f)inlinevoid

Run the given function on each direct member with the value of the member as parameter.

==operator( IPV4&const other)constbool

Equality operator.

!=operator( IPV4&const other)constbool

Inequality operator.

stdstringtoString()const::

Get the value as string.

Public Static Attributes

DataModelNodeTypenodeType=DataModelNodeTypegroupstaticconstexpr:: ::::

The type of this node.

path={}staticconstexprconstchar* "IPV4"

The full path for this value.

name={}staticconstexprconstchar* "IPV4"

The name of this value.

static constexpr const char * description   = { R"description(IPv4 network configuration)description" }

The description for this value.

Friends

stdostream&<<operator(stdostream&:: stream, IPV4&const value)inlinefriend::

Operator to send the value as string to a stream.

Addressclass

The camera's IPv4 address.

Only used in manual mode.

To be able to connect to the camera, the camera's IP address must be in the same subnet as the IP address of the computer's local network interface.

Public Types

ValueType=stdstringusing ::

The type of the underlying value.

Public Functions

Address()=default

Default constructor.

Address(stdstringvalue:: )inlineexplicit

Constructor.

stdstring&value()constconst::

Get the value.

stdstringtoString()const::

Get the value as string.

==operator( Address&const other)constinlinebool

Comparison operator.

!=operator( Address&const other)constinlinebool

Comparison operator.

<operator( Address&const other)constinlinebool

Comparison operator.

>operator( Address&const other)constinlinebool

Comparison operator.

<=operator( Address&const other)constinlinebool

Comparison operator.

>=operator( Address&const other)constinlinebool

Comparison operator.

Public Static Attributes

DataModelNodeTypenodeType=DataModelNodeTypeleafValuestaticconstexpr:: ::::

The type of this node.

path={}staticconstexprconstchar* "IPV4/Address"

The full path for this value.

name={}staticconstexprconstchar* "Address"

The name of this value.

static constexpr const char * description  {R"description(The camera's IPv4 address. Only used in manual mode.To be able to connect to the camera, the camera's IPaddress must be in the same subnet as the IP addressof the computer's local network interface.)description"}

The description for this value.

Friends

stdostream&<<operator(stdostream&:: stream, Address&const value)inlinefriend::

Operator to serialize the value to a stream.

Modeclass

DHCP or manual configuration.

Public Types

ValueTypeenumclass

The type of the underlying value.

Values:

dhcpenumerator
manualenumerator

Public Functions

Mode()=default

Default constructor.

Mode(ValueTypevalue )inlineexplicitconstexpr

Constructor.

ValueTypevalue()const

Get the value.

stdstringtoString()const::

Get the value as string.

==operator( Mode&const other)constinlinebool

Comparison operator.

!=operator( Mode&const other)constinlinebool

Comparison operator.

Public Static Functions

stdsetValueType validValues()staticinline::<>

All valid values of Mode.

Public Static Attributes

DataModelNodeTypenodeType=DataModelNodeTypeleafValuestaticconstexpr:: ::::

The type of this node.

path={}staticconstexprconstchar* "IPV4/Mode"

The full path for this value.

name={}staticconstexprconstchar* "Mode"

The name of this value.

static constexpr const char * description   = { R"description(DHCP or manual configuration)description" }

The description for this value.

Modedhcpstaticconst

dhcp

Modemanualstaticconst

manual

Friends

stdostream&<<operator(stdostream&:: stream, ModeValueType&const:: value)inlinefriend::

Operator to serialize ValueType to a stream.

stdostream&<<operator(stdostream&:: stream, Mode&const value)inlinefriend::

Operator to serialize the value to a stream.

SubnetMaskclass

The camera's subnet mask (for example 255.255.255.0).

Only used in manual mode.

To be able to connect to the camera, the camera's subnet mask must be the same as the subnet mask of the computer's local network interface.

Public Types

ValueType=stdstringusing ::

The type of the underlying value.

Public Functions

SubnetMask()=default

Default constructor.

SubnetMask(stdstringvalue:: )inlineexplicit

Constructor.

stdstring&value()constconst::

Get the value.

stdstringtoString()const::

Get the value as string.

==operator( SubnetMask&const other)constinlinebool

Comparison operator.

!=operator( SubnetMask&const other)constinlinebool

Comparison operator.

<operator( SubnetMask&const other)constinlinebool

Comparison operator.

>operator( SubnetMask&const other)constinlinebool

Comparison operator.

<=operator( SubnetMask&const other)constinlinebool

Comparison operator.

>=operator( SubnetMask&const other)constinlinebool

Comparison operator.

Public Static Attributes

DataModelNodeTypenodeType=DataModelNodeTypeleafValuestaticconstexpr:: ::::

The type of this node.

path={}staticconstexprconstchar* "IPV4/SubnetMask"

The full path for this value.

name={}staticconstexprconstchar* "SubnetMask"

The name of this value.

static constexpr const char * description  {R"description(The camera's subnet mask (for example 255.255.255.0). Only used in manual mode.To be able to connect to the camera, the camera's subnet mask must be the same as the subnet mask of thecomputer's local network interface.)description"}

The description for this value.

Friends

stdostream&<<operator(stdostream&:: stream, SubnetMask&const value)inlinefriend::

Operator to serialize the value to a stream.

NetworkConfigurationstruct

Network configuration of a camera.

Public Functions

System::String ^ Serialize ()

Serialize to a string.

See also FromSerialized. The returned string is formatted in YAML, and is compatible with the contents of files saved using Save.

void Save (System::String ^ fileName)

Save to the given file.

void Load (System::String ^ fileName)

Load from the given file.

NetworkConfiguration()inline

Constructor.

NetworkConfiguration ^ CopyWith (CopyWithDelegate ^ delegate)

Create a clone (deep copy) of the current instance and invoke delegate on the clone.

Creates a clone (deep copy) of this object, then invokes the delegate function on the clone, and finally returns the clone. This method can be used to create a clone of an instance and then change one or more properties on the clone in one method call. The current instance is unchanged.

NetworkConfiguration ^ Clone ()

Create a clone (deep copy) of the current instance.

System::String ^ ToString () override

Get string representation of the object.

Public Static Attributes

static NetworkConfiguration(System::String ^ fileName) NetworkConfiguration FromSerialized )(System::String ^ value)

Construct NetworkConfiguration by loading from file.

Construct a new NetworkConfiguration instance from a previously serialized string

See also Serialize.

IPV4Groupstruct

IPv4 network configuration.

Public Types

ModeOption:stdunderlying_typeZividNetworkConfigurationIPV4ModeValueType::typeenumclass ::<::::::::>

DHCP or manual configuration.

Values:

Dhcpenumerator
Manualenumerator

Public Functions

IPV4Group()inline

Constructor.

IPV4Group ^ CopyWith (CopyWithDelegate ^ delegate)

Create a clone (deep copy) of the current instance and invoke delegate on the clone.

Creates a clone (deep copy) of this object, then invokes the delegate function on the clone, and finally returns the clone. This method can be used to create a clone of an instance and then change one or more properties on the clone in one method call. The current instance is unchanged.

IPV4Group ^ Clone ()

Create a clone (deep copy) of the current instance.

System::String ^ ToString () override

Get string representation of the object.

Properties

System::String^ Address

The camera's IPv4 address.

Only used in manual mode.

To be able to connect to the camera, the camera's IP address must be in the same subnet as the IP address of the computer's local network interface.

ModeOptionMode

DHCP or manual configuration.

System::String^ SubnetMask

The camera's subnet mask (for example 255.255.255.0).

Only used in manual mode.

To be able to connect to the camera, the camera's subnet mask must be the same as the subnet mask of the computer's local network interface.

classNetworkConfiguration(
:NetworkConfiguration | None=Noneipv4 ,
)

Network configuration of a camera

Initialization

classIPV4(
:str='172.28.60.5'address ,
:str='manual'mode ,
:str='255.255.255.0'subnet_mask ,
)

IPv4 network configuration

Initialization

classMode

DHCP or manual configuration

dhcp='dhcp'
manual='manual'
classmethodvalid_values()

All valid values of Mode

propertyaddress

The camera's IPv4 address. Only used in manual mode. To be able to connect to the camera, the camera's IP address must be in the same subnet as the IP address of the computer's local network interface.

propertymode

DHCP or manual configuration

propertysubnet_mask

The camera's subnet mask (for example 255.255.255.0). Only used in manual mode. To be able to connect to the camera, the camera's subnet mask must be the same as the subnet mask of the computer's local network interface.

propertyipv4

IPv4 network configuration

classmethodload(file_name)

Construct NetworkConfiguration by loading from file

save(file_name)

Save to the given file

classmethodfrom_serialized(value)

Construct a new NetworkConfiguration instance from a previously serialized string

See also serialize.

serialize()

Serialize to a string

See also from_serialized. The returned string is formatted in YAML, and is compatible with the contents of files saved using save.

另请参阅