AXIS Camera Management SDK 2.00

Overview

AXIS Camera Management SDK 2.00

Introduction

This documentation lists the functionality included in AXIS Camera Management SDK and explains how the functionality can be integrated and used in containing applications.

Please read the License Agreement carefully before proceeding.

Microsoft, Windows, Internet Explorer, Visual C++, Visual C#, Visual Basic, .NET, Visual Studio are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries.

Bonjour is either registered trademark or trademark of Apple Corporation in the United States and/or other countries. AXIS Camera Management SDK includes licensed software from Apple Corporation.

The information contained herein is provided for reference only. Axis Communications AB makes no warranties or claims for the suitability or correctness of this information for third party developed applications. Axis does however, provide development support through its Application Development Partner Program. More information about the ADP program can be found at www.axis.com/partner/adp_intro.htm.

Overview

AXIS Camera Management SDK contains functionality to discover and manage Axis video devices on a network. The SDK is used by e.g., the AXIS Camera Management application for all network related functionality. The SDK can be used by any application and supports discovery, multiple unit configuration, status, assign IP, enable DHCP, restart, factory default, user management, update and download software, imaging, templates and upgrade of Axis video devices.

Some functionality in the SDK, like communicating with devices that have an invalid IP address, require computer administrator access rights.

Supported video devices are: AXIS 2xx video products with firmware versions 4.03/4.10 or higher except AXIS 205, AXIS 230, AXIS 250S, AXIS 262 and AXIS 292.

.NET interface

The SDK has a .NET interface, which is intended to be used from .NET e.g. C# and Visual Basic .NET applications. Samples in unmanaged C++ describes how the .NET interface can be used from other languages like e.g. native C++ by implementing a mixed mode wrapper between native C++ and managed C++. A simplified class overview is also available for the .NET interface.

Programming model

The SDK API interface follows the asynchronous programming design pattern generally used in the .NET framework. Most network operations take some time to complete, and it is often convenient to start multiple operations and then wait for them to complete or be notified when they are completed. During this time, other work can be done.

It is, of course, also possible to use the API in a synchronous pattern, which is a simpler way of using the API. Most samples in this SDK uses this approach when demonstrating the API. An asynchronous sample is demonstrated in the asynchronous pattern page.

Samples

This SDK also contains a number of samples that demonstrate how to use the SDK API. There are samples in two different languages, Visual C# and C++. The samples in this help file are also available as full Microsoft Visual Studio projects in the Samples folder, in the AXIS Camera Management SDK Start Menu entry, or in the installation folder.

.NET Framework 2.0 Dependency

The AXIS Camera Management SDK API is implemented in C#, and requires that the Microsoft .NET framework 2.0 is installed on the computer where the API is used. Please see the redistributing page for more information.

Windows 64-Bit Support

The AXIS Camera Management SDK can be used on 64-Bit Windows such as Microsoft Windows XP 64-bit and Microsoft Windows Server 2003, Standard x64 Edition. The Windows 64-Bit Support section in the redistributing page describes how to enable full 64-Bit support.

Copyright (C) 2005-2006 Axis Communications AB. All rights reserved.


Redistributing

AXIS Camera Management SDK 2.00

Class Overview

The DeviceMgr namespace contains several interfaces that are here arranged with the major classes used by these interfaces.

A list of all classes in alphabetical order can be found under the DeviceMgr namespace.

AssignIP

Used when assigning IP addresses and enabling DHCP to devices on the network.

Discover

Used when discovering and searching for devices on the network.

Related Classes | Description
DiscoveredDeviceList | A list of DiscoveredDevice objects.
DiscoveredDevice | Containing parameters and values received from device discovered with Discover
DiscoverEventArgs | Provides data for the DiscoverUpdate event.

Imaging

Used when getting image snapshots from devices on the network. Snapshots from network cameras as well as video servers with multiple camera sources, e.g. AXIS 241Q, are supported.

Maintenance

Used for restarting and setting factory default.

OperationMgr

Creates and manages Operations and reports the progress.

Related Classes | Description
Operation | Container created by OperationMgr for one or multiple functions that can be run in parallel or in sequence.

Pinger

Used to determine if an IP address is in use.

Settings

Contains methods for setting up the component environment.

Status

Used when monitoring Axis devices on the network.

Related Classes | Description
StatusEventArgs | Provides data for the StatusUpdate event.

Template

Used when applying templates to Axis device on the network.

Related Classes | Description
TemplateConst | Containing constants used when building a Template.

Update

Used when downloading available software updates from Axis web site.

Related Classes | Description
AvailableSoftware | Describes the available products with software on Axis web site and is used via Update.
ProductList | A list of Products with compatible software.
Product | A product (e.g. AXIS 211) with compatible software returned by Update.
SoftwareList | A list of Software objects.
Software | Product software with a specific SoftwareVersion used in Update.
SoftwareVersion | A specific version of a Software.

Upgrade

Used when upgrading firmware in an Axis device on the network.

UserManagement

Employed when getting, setting and removing users.

Related Classes | Description
UserList | A list of Users.
User | Describes a user in an Axis device and is employed when adding or getting users via UserManagement.

Common

These are used by several of the interfaces.

Related Classes | Description
ConnectionInfo | Describing how a device on the network is accessed with e.g. address and port number.
ResultList | A list of Results.
Result | Describing the status of a completed function or Operation.
ResultName | Listing possible Result.Names.
ParameterList | A list of Parameters objects.
Parameter | Containing Parameter names and values used by e.g. Config.

Copyright (C) 2005-2006 Axis Communications AB. All rights reserved.


The asynchronous pattern

Most methods in this SDK API is implemented as asynchronous methods. They all follow the asynchronous programming design pattern. The pattern consists of a client object, which makes an asynchronous request to a service object. The request is started by the client that makes a BeginRequest call in the service object. Since the call is asynchronous the call is immediately returned, and the client must wait for the request to complete. The service object will call the specified callback function when the request is completed, and then, the client can call EndRequest to retrieve the result of the request. If EndRequest is called before the request is complete (before the callback function is called), the EndRequest call will wait until the request is complete and return the result. The client can include a request state object as a parameter in the BeginRequest. This request state object is provided in the completion callback.

Asynchronous pattern in C#

The following C# sample program demonstrates how to use asynchronous calls with the DeviceMgr.Pinger class. The sample is a console program that takes an address from the command line, sends a ping to the address, and then prints the result (address exist or not) to the console. This asynchronous sample corresponds to the simplified synchronous pattern in the samples.

The program defines two classes for its own use, the RequestState class, which passes data across asynchronous calls, and the PingAsync class, which calls the DeviceMgr.Pinger class to perform the asynchronous ping to an address.

The RequestState class preserves the state of the request across calls to the asynchronous methods that service the request. It contains the pinger reference used to begin the request, the address that is pinged, and the result of the asynchronous ping request.

The PingAsync class implements an asynchronous ping request to an address and writes the resulting response to the console. It contains the methods and properties described in the following list.

  • The allDone property contains an instance of the class that signals the completion of the request.
  • The Main() method reads the command line and begins the ping request to the specified address. It creates the Pinger object pinger and the RequestState requestState, calls BeginPing to begin processing the request, and then calls the allDone.WaitOne() method so that the application will not exit until the callback is complete. After the response is read, Main() writes it to the console and the application ends.
  • The PingCallback() method implements the asynchronous callback method for the ping request. It gets the result of the ping request by calling EndPing. The result is placed in the requestState object and calls the allDone.Set() method to inform the Main() function that the ping result is present in requestState.

using System;
using System.Threading;
using DeviceMgr;

// The RequestState class passes data across async calls.
public class RequestState
{
   public Pinger pinger;
   public string address;
   public bool result;
}

// PingAsync demonstrates how to use async callbacks
class PingAsync
{
   public static ManualResetEvent allDone = new ManualResetEvent(false);

   public static void Main(string[] args)
   {
      if (args.Length != 1)
      {
         Console.WriteLine("Usage: ping address");
         return;
      }

      // Get the address from the command line.
      string address = args[0];

      // Create the Pinger class object, which will perform the ping request.
      Pinger pinger = new Pinger();

      // Create the state object
      RequestState requestState = new RequestState();
      requestState.pinger = pinger;
      requestState.address = address;

      // Specify address to ping
      ConnectionInfo connectionInfo = new ConnectionInfo("10.84.154.100");

      // Start the asynchronous pinging
      IAsyncResult asyncResult = pinger.BeginPing(connectionInfo,
         new AsyncCallback(PingCallback), requestState);

      // Wait until the ManualResetEvent is set in PingCallback so that the
      // application does not exit until after the PingCallback is called.
      allDone.WaitOne();

      // Write the result
      Console.WriteLine("Address {0} exists={1}",
         requestState.address, requestState.result);
   }

   // Callback called by Pinger when the ping request is completed.
   private static void PingCallback(IAsyncResult ar)
   {
      // Get the RequestState object from the async result.
      RequestState requestState = (RequestState) ar.AsyncState;

      // Get the pinger used to begin the ping request.
      Pinger pinger = requestState.pinger;

      // Call EndPing, which will return the ping result from the
      // BeginPing call above.
      bool result = pinger.EndPing(ar).Status == ResultStatus.OK;

      // Save the result to the requestState object, so the Main()
      // function can get the result
      requestState.result = result;

      // Set the ManualResetEvent so the main thread can exit
      allDone.Set();
   }
}

Copyright (C) 2005-2006 Axis Communications AB. All rights reserved.


The asynchronous pattern

AXIS Camera Management SDK 2.00

Mixed Mode and Unmanaged C++

The Camera Management SDK is implemented in .NET 2.0, in order to use the API the application that calls it has to be either a pure .NET application, such as a VB.NET or C# program. However it's also possible to call the API from an unmanaged C++ application using a mixed mode wrapper, or by enabling mixed mode C++ in your existing application. A mixed mode application is an application that both contains traditional unmanaged C++ code compiled into native code, as well as managed C++ that is compiled into .NET code. Whichever method you should use depends on your application and your needs.

Among other things, it's worth noting that the different memory models used in unmanaged and managed code have different life times for its allocated memory. Make sure that the managed objects isn't disposed by the garbage collector while the native code still uses the managed objects. Likewise, make sure that the native memory isn't de-allocated while the managed code still uses it.

Using a Mixed Mode Wrapper DLL

A mixed mode wrapper DLL is able to expose an unmanaged DLL interface that can be called from any native application capable of loading DLLs and calling its exported functions. The DLL is loaded like any other regular native DLL and it takes care of loading and starting the .NET runtime by itself. The calling application won't know, and doesn't need to know, that it's a mixed mode DLL running in the .NET environment.

Creating a Mixed Mode DLL can be done in a few steps using Visual Studio 2005,

1. Create a C++/CLR Class Library project
2. Add a new Class to use in your DLL interface, uncheck the "Managed" checkbox.
3. Add the unmanaged functions to export in the DLL. (See MSDN, "Walkthrough: Creating and Using a Dynamic Link Library.")
4. Access the managed classes and code in these functions. (Add a reference to the managed assembly to your project.)

The unmanaged functions exported in the DLL can now be called and used from a regular C++ application.
1. Include the class header defined in step 2 and 3 above.
2. Add the compiled .lib from the C++/CLR project.
3. Call the functions in the C++/CLR DLL as you normally would in a C++ application.

Keep in mind that there are some restrictions on how the C++/CLR DLL starts up when loaded,
this is in order to avoid loader locks, see the "Initialization of Mixed Assemblies" for more information about this.
In short, don't make any calls to the CLR from DllMain and avoid initializing static objects dynamically.

NOTE: An example wrapper using this technique is provided in the samples folder. It implements a basic structure for using the features of the SDK API from an unmanaged C++ application.

Enabling Mixed Mode in an existing application

An existing application can also be changed to support mixed mode by enabling .NET support. For more information about this, see the "How to: Compile MFC and ATL Code with /clr" article.

Deployment Dependencies

A mixed mode wrapper DLL, and a mixed mode application, has some dependencies that has to be taken into account when installing the application that uses it.

The following needs to be installed,

  • .NET 2.0 Framework
  • MS VC CRT 8.0, see KB 326922 and the redist.txt in VC2005.

References

New Language Features in Visual C++
http://msdn2.microsoft.com/en-us/library/xey702bw.aspx

Walkthrough: Creating and Using a Dynamic Link Library
http://msdn2.microsoft.com/en-us/library/ms235636(VS.80).aspx

Initialization of Mixed Assemblies
http://msdn2.microsoft.com/en-us/library/ms173266.aspx

Walkthrough: Creating and Using a Managed Assembly
http://msdn2.microsoft.com/en-us/library/ms235638(VS.80).aspx

Integrate Windows Forms Into Your MFC Applications Through C++ Interop
http://msdn.microsoft.com/msdnmag/issues/06/05/MixAndMatch/default.aspx

How to: Compile MFC and ATL Code with /clr
http://msdn2.microsoft.com/en-us/library/ms235211.aspx

Copyright (C) 2005-2006 Axis Communications AB. All rights reserved.


Redistributing

Installing the Microsoft .NET Framework 2.0

The Microsoft .NET framework 2.0 is required in order to use the AXIS Camera Management SDK API. The framework is installed (if needed), while the SDK setup is run. It is also included in the AXIS Camera Management application setup.

The framework can be installed by launching the dotnetfx.exe setup program available in the AXIS Camera Management SDK\dotnet folder. A wizard will guide the user through the installation.

The dotnetfx.exe setup can be launched from within another installation by using command parameters like:

dotnetfx.exe /c:"install /l"

The dotnetfx.exe setup can also be launched silently using command parameters like:

dotnetfx.exe /q:a /c:"install /l /q"

The dotnetfx.exe setup will automatically check if an installation is needed or not. However, this check takes a few seconds and can be done manually by checking the existence of a registry key. If the key exists, the .NET framework 2.0 is already installed and dotnetfx.exe setup does not need to launch. The registry key to check is:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\policy\v2.0

Even if your application installed the .NET 2.0 Framework, your application should not uninstall it when the application is uninstalled. Other applications installed after or before your application may still need the framework in order to function correctly. It's up to the user to uninstall the framework using the "Add/Remove Programs" entry for "Microsoft .NET Framework 2.0" when the framework is no longer needed.

The .NET Framework 2.0 can also be downloaded and installed by using Microsoft's Windows Update functionality.

Installing the AXIS Camera Management SDK Redistributables

Copy all files in the AXIS Device Manager SDK\bin folder to the target folder.

Uninstalling the AXIS Camera Management SDK Redistributables

All files copied during installation can then be deleted.

Redistributable Files

Files in AXIS Camera Management SDK\dotnet folder:

  • dotnetfx.exe - is the setup program for installing the .NET Framework 2.0.

Files in AXIS Camera Management SDK\bin folder:

  • Bonjour.dll - C++ DLL (32-Bit), which contain the Bonjour protocol discovery functionality.
  • Bonjour_x64.dll - C++ DLL (64-Bit), which contain the Bonjour protocol discovery functionality.
  • Common.dll - Internal common functionality.
  • DeviceMgr.dll - The actual AXIS Camera Management SDK functionality.
  • log4net.dll - Logging functionality.

Windows 64-Bit Support

On Microsoft Windows XP 64-bit and Microsoft Windows Server 2003, Standard x64 Edition two issues needs special attention.

  1. The .NET framework that is included in the installation is 32-Bit. For 64-Bit Windows, a 64-Bit .NET framework must be installed and is available from Microsoft .NET Framework Developer Center.
  2. The Bonjour discovery functionality is provided in a native DLL and available in both 32-Bit and 64-Bit versions. For 64-Bit Windows, the 64-Bit bonjour_x64.dll DLL must manually be renamed to bonjour.dll and thus replace the default 32-Bit version.

Please read the License Agreement carefully before proceeding.

Copyright (C) 2005-2006 Axis Communications AB. All rights reserved.


AXIS STANDARD SOFTWARE LICENSE AGREEMENT

This is a legal agreement between you (either individual or an entity) and Axis
Communications AB (hereinafter referred to as "Axis"). By installing the SOFTWARE,
you are agreeing to be bound by the terms of this agreement.

AXIS SOFTWARE LICENSE

1. GRANT OF LICENSE.

1.1	Axis grants to you the right to use the SOFTWARE. The SOFTWARE is in
"use" on a computer when it is loaded into temporary memory (i.e. RAM)
or installed into permanent memory (e.g. hard disk, CD-ROM or other
storage device) of that computer.

2. COPYRIGHT.

2.1	The SOFTWARE is owned by Axis and/or its licensor(s), if any, and is
protected by copyright laws and international treaty provisions. Therefore
you must treat the SOFTWARE like any other copyrighted material (e.g. a
book or a musical recording) except that you may either (a) make a copy of
the SOFTWARE solely for backup or archival purposes or (b) transfer the
SOFTWARE to a single hard disk provided you keep the original solely for
backup purposes.

3. OTHER RESTRICTIONS.

3.1	You may not rent, lease or sublicense the SOFTWARE but you may
transfer SOFTWARE and accompanying written materials on a permanent
basis provided that you retain no copies and the recipient agrees to the
terms of this agreement. You may not reverse engineer, decompile, or
disassemble the SOFTWARE. If the SOFTWARE is an update or has been
updated, any transfer must include the most recent update and all previous
versions.

4. THIRD PARTY SOFTWARE.

4.1	The SOFTWARE may contain third party software, which requires notices
and/or additional terms and conditions. Such required third party software
notices and/or additional terms and conditions are located in the readme file
or other product documentation. By accepting this license agreement, you
are also accepting the additional terms and conditions, if any, set forth
therein.

5. ADDITIONAL LICENSE RIGHTS – REDISTRIBUTABLE CODE AND SAMPLE
CODE.

5.1	In addition to the rights granted in Section 1, certain parts of the
SOFTWARE, i.e. SAMPLE CODE AND REDISTRIBUTABLE CODE
(collectively the REDISTRIBUTABLES) as described in this Section 5, are
provided to you with additional license rights. These additional license
rights are conditioned upon your compliance with the distribution
requirements and license restrictions described in Sections 5 and 6.

5.2	SAMPLE CODE is identified as <Installed SDK Location>\Samples.
Axis grants to you (i) the right to use
and modify the source code version of the SAMPLE CODE for the purpose
of designing, developing and testing your software product and (ii) a non-
exclusive, non-assignable right to reproduce and distribute the SAMPLE
CODE, along with modifications thereof, in object and/or source code form.
For further applicable redistribution requirements, see Section 6 below.

5.3	REDISTRIBUTABLE CODE is identified as <Installed SDK Location>\Bin.
Axis grants you a non-exclusive, non-assignable right to reproduce or
distribute theREDISTRIBUTABLE CODE in object code form. For further applicable
redistribution requirements, see Section 6 below.

6. REDISTRIBUTION REQUIREMENTS AND LICENSE RESTRICTIONS
REGARDING REDISTRIBUTABLE CODE AND SAMPLE CODE.

6.1	If you redistribute the REDISTRIBUTABLES, you agree to (i) only
distribute the REDISTRIBUTABLES, or portions thereof, as part of the
product or application you develop by using the REDISTRIBUTABLES
under the condition that the product or application adds significant and
primary functionality to the REDISTRIBUTABLES, (ii) not to use Axis'
name or trademark to market your product or application without written
permission, (iii) not to remove or obscure any copyright, trademark or
patent notices that appear on the SOFTWARE as delivered to you, (iv)
assume the sole responsibility to your customers for any update or support
obligations or other liability which may arise from the distribution of the
REDISTRIBUTABLES, (v) not make any statement that your product is
"certified" or that its performance is guaranteed by Axis, (vi) only distribute
the REDISTRIBUTABLES subject to a license agreement that protects
Axis' interests consistent with the terms contained in this Agreement, (vii)
indemnify, hold harmless and defend Axis from and against any claims or
lawsuits, including attorney's fees that arise or result from your distribution
of the product or application, and (viii) otherwise comply with the terms of
this Agreement

7. TERMINATION

7.1	This License is effective until terminated. Your rights under this License
will terminate automatically without notice from Axis if you fail to comply
with any term(s) of this License. Upon the termination of this License, you
shall cease all use of the SOFTWARE and destroy all copies, full or partial,
of the SOFTWARE.

8. GOVERNING LAW

8.1	This agreement shall be deemed performed in and shall be construed by the
laws of Sweden.

9. DISCLAIMER

9.1	THE SOFTWARE IS DELIVERED FREE OF CHARGE AND 'AS IS'
WITHOUT WARRANTY OF ANY KIND. THE ENTIRE RISK AS TO
THE RESULTS AND PERFORMANCE OF THE SOFTWARE IS
ASSUMED BY YOU/THE USER. AXIS COMMUNICATIONS AB
DISCLAIMS ALL WARRANTIES, WHETHER EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE,
TITLE AND NON-INFRINGEMENT, OR ANY WARRANTY ARISING
OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE WITH
RESPECT TO THE SOFTWARE.

9.2	AXIS AND/OR ITS LICENSOR(S) SHALL NOT BE LIABLE FOR LOSS
OF DATA, LOSS OF PRODUCTION, LOSS OF PROFIT, LOSS OF USE,
LOSS OF CONTRACTS OR FOR ANY OTHER CONSEQUENTIAL,
ECONOMIC OR INDIRECT LOSS WHATSOEVER IN RESPECT OF
DELIVERY, USE OR DISPOSITION OF THE SOFTWARE.

9.3	AXIS TOTAL LIABILITY FOR ALL CLAIMS IN ACCORDANCE
WITH THE DELIVERY AND USE OF THE SOFTWARE SHALL NOT
EXCEED THE PRICE PAID FOR THE SOFTWARE.

--------------------------------------------------------
APPLE PUBLIC SOURCE LICENSE
Version 2.0 - August 6, 2003

Please read this License carefully before downloading this software.
By downloading or using this software, you are agreeing to be bound by
the terms of this License. If you do not or cannot agree to the terms
of this License, please do not download or use the software.

1. General; Definitions. This License applies to any program or other
work which Apple Computer, Inc. ("Apple") makes publicly available and
which contains a notice placed by Apple identifying such program or
work as "Original Code" and stating that it is subject to the terms of
this Apple Public Source License version 2.0 ("License"). As used in
this License:

1.1 "Applicable Patent Rights" mean: (a) in the case where Apple is
the grantor of rights, (i) claims of patents that are now or hereafter
acquired, owned by or assigned to Apple and (ii) that cover subject
matter contained in the Original Code, but only to the extent
necessary to use, reproduce and/or distribute the Original Code
without infringement; and (b) in the case where You are the grantor of
rights, (i) claims of patents that are now or hereafter acquired,
owned by or assigned to You and (ii) that cover subject matter in Your
Modifications, taken alone or in combination with Original Code.

1.2 "Contributor" means any person or entity that creates or
contributes to the creation of Modifications.

1.3 "Covered Code" means the Original Code, Modifications, the
combination of Original Code and any Modifications, and/or any
respective portions thereof.

1.4 "Externally Deploy" means: (a) to sublicense, distribute or
otherwise make Covered Code available, directly or indirectly, to
anyone other than You; and/or (b) to use Covered Code, alone or as
part of a Larger Work, in any way to provide a service, including but
not limited to delivery of content, through electronic communication
with a client other than You.

1.5 "Larger Work" means a work which combines Covered Code or portions
thereof with code not governed by the terms of this License.

1.6 "Modifications" mean any addition to, deletion from, and/or change
to, the substance and/or structure of the Original Code, any previous
Modifications, the combination of Original Code and any previous
Modifications, and/or any respective portions thereof. When code is
released as a series of files, a Modification is: (a) any addition to
or deletion from the contents of a file containing Covered Code;
and/or (b) any new file or other representation of computer program
statements that contains any part of Covered Code.

1.7 "Original Code" means (a) the Source Code of a program or other
work as originally made available by Apple under this License,
including the Source Code of any updates or upgrades to such programs
or works made available by Apple under this License, and that has been
expressly identified by Apple as such in the header file(s) of such
work; and (b) the object code compiled from such Source Code and
originally made available by Apple under this License.

1.8 "Source Code" means the human readable form of a program or other
work that is suitable for making modifications to it, including all
modules it contains, plus any associated interface definition files,
scripts used to control compilation and installation of an executable
(object code).

1.9 "You" or "Your" means an individual or a legal entity exercising
rights under this License. For legal entities, "You" or "Your"
includes any entity which controls, is controlled by, or is under
common control with, You, where "control" means (a) the power, direct
or indirect, to cause the direction or management of such entity,
whether by contract or otherwise, or (b) ownership of fifty percent
(50%) or more of the outstanding shares or beneficial ownership of
such entity.

2. Permitted Uses; Conditions & Restrictions. Subject to the terms
and conditions of this License, Apple hereby grants You, effective on
the date You accept this License and download the Original Code, a
world-wide, royalty-free, non-exclusive license, to the extent of
Apple's Applicable Patent Rights and copyrights covering the Original
Code, to do the following:

2.1 Unmodified Code. You may use, reproduce, display, perform,
internally distribute within Your organization, and Externally Deploy
verbatim, unmodified copies of the Original Code, for commercial or
non-commercial purposes, provided that in each instance:

(a) You must retain and reproduce in all copies of Original Code the
copyright and other proprietary notices and disclaimers of Apple as
they appear in the Original Code, and keep intact all notices in the
Original Code that refer to this License; and

(b) You must include a copy of this License with every copy of Source
Code of Covered Code and documentation You distribute or Externally
Deploy, and You may not offer or impose any terms on such Source Code
that alter or restrict this License or the recipients' rights
hereunder, except as permitted under Section 6.

2.2 Modified Code. You may modify Covered Code and use, reproduce,
display, perform, internally distribute within Your organization, and
Externally Deploy Your Modifications and Covered Code, for commercial
or non-commercial purposes, provided that in each instance You also
meet all of these conditions:

(a) You must satisfy all the conditions of Section 2.1 with respect to
the Source Code of the Covered Code;

(b) You must duplicate, to the extent it does not already exist, the
notice in Exhibit A in each file of the Source Code of all Your
Modifications, and cause the modified files to carry prominent notices
stating that You changed the files and the date of any change; and

(c) If You Externally Deploy Your Modifications, You must make
Source Code of all Your Externally Deployed Modifications either
available to those to whom You have Externally Deployed Your
Modifications, or publicly available. Source Code of Your Externally
Deployed Modifications must be released under the terms set forth in
this License, including the license grants set forth in Section 3
below, for as long as you Externally Deploy the Covered Code or twelve
(12) months from the date of initial External Deployment, whichever is
longer. You should preferably distribute the Source Code of Your
Externally Deployed Modifications electronically (e.g. download from a
web site).

2.3 Distribution of Executable Versions. In addition, if You
Externally Deploy Covered Code (Original Code and/or Modifications) in
object code, executable form only, You must include a prominent
notice, in the code itself as well as in related documentation,
stating that Source Code of the Covered Code is available under the
terms of this License with information on how and where to obtain such
Source Code.

2.4 Third Party Rights. You expressly acknowledge and agree that
although Apple and each Contributor grants the licenses to their
respective portions of the Covered Code set forth herein, no
assurances are provided by Apple or any Contributor that the Covered
Code does not infringe the patent or other intellectual property
rights of any other entity. Apple and each Contributor disclaim any
liability to You for claims brought by any other entity based on
infringement of intellectual property rights or otherwise. As a
condition to exercising the rights and licenses granted hereunder, You
hereby assume sole responsibility to secure any other intellectual
property rights needed, if any. For example, if a third party patent
license is required to allow You to distribute the Covered Code, it is
Your responsibility to acquire that license before distributing the
Covered Code.

3. Your Grants. In consideration of, and as a condition to, the
licenses granted to You under this License, You hereby grant to any
person or entity receiving or distributing Covered Code under this
License a non-exclusive, royalty-free, perpetual, irrevocable license,
under Your Applicable Patent Rights and other intellectual property
rights (other than patent) owned or controlled by You, to use,
reproduce, display, perform, modify, sublicense, distribute and
Externally Deploy Your Modifications of the same scope and extent as
Apple's licenses under Sections 2.1 and 2.2 above.

4. Larger Works. You may create a Larger Work by combining Covered
Code with other code not governed by the terms of this License and
distribute the Larger Work as a single product. In each such instance,
You must make sure the requirements of this License are fulfilled for
the Covered Code or any portion thereof.

5. Limitations on Patent License. Except as expressly stated in
Section 2, no other patent rights, express or implied, are granted by
Apple herein. Modifications and/or Larger Works may require additional
patent licenses from Apple which Apple may grant in its sole
discretion.

6. Additional Terms. You may choose to offer, and to charge a fee for,
warranty, support, indemnity or liability obligations and/or other
rights consistent with the scope of the license granted herein
("Additional Terms") to one or more recipients of Covered Code.
However, You may do so only on Your own behalf and as Your sole
responsibility, and not on behalf of Apple or any Contributor. You
must obtain the recipient's agreement that any such Additional Terms
are offered by You alone, and You hereby agree to indemnify, defend
and hold Apple and every Contributor harmless for any liability
incurred by or claims asserted against Apple or such Contributor by
reason of any such Additional Terms.

7. Versions of the License. Apple may publish revised and/or new
versions of this License from time to time. Each version will be given
a distinguishing version number. Once Original Code has been published
under a particular version of this License, You may continue to use it
under the terms of that version. You may also choose to use such
Original Code under the terms of any subsequent version of this
License published by Apple. No one other than Apple has the right to
modify the terms applicable to Covered Code created under this
License.

8. NO WARRANTY OR SUPPORT. The Covered Code may contain in whole or in
part pre-release, untested, or not fully tested works. The Covered
Code may contain errors that could cause failures or loss of data, and
may be incomplete or contain inaccuracies. You expressly acknowledge
and agree that use of the Covered Code, or any portion thereof, is at
Your sole and entire risk. THE COVERED CODE IS PROVIDED "AS IS" AND
WITHOUT WARRANTY, UPGRADES OR SUPPORT OF ANY KIND AND APPLE AND
APPLE'S LICENSOR(S) (COLLECTIVELY REFERRED TO AS "APPLE" FOR THE
PURPOSES OF SECTIONS 8 AND 9) AND ALL CONTRIBUTORS EXPRESSLY DISCLAIM
ALL WARRANTIES AND/OR CONDITIONS, EXPRESS OR IMPLIED, INCLUDING, BUT
NOT LIMITED TO, THE IMPLIED WARRANTIES AND/OR CONDITIONS OF
MERCHANTABILITY, OF SATISFACTORY QUALITY, OF FITNESS FOR A PARTICULAR
PURPOSE, OF ACCURACY, OF QUIET ENJOYMENT, AND NONINFRINGEMENT OF THIRD
PARTY RIGHTS. APPLE AND EACH CONTRIBUTOR DOES NOT WARRANT AGAINST
INTERFERENCE WITH YOUR ENJOYMENT OF THE COVERED CODE, THAT THE
FUNCTIONS CONTAINED IN THE COVERED CODE WILL MEET YOUR REQUIREMENTS,
THAT THE OPERATION OF THE COVERED CODE WILL BE UNINTERRUPTED OR
ERROR-FREE, OR THAT DEFECTS IN THE COVERED CODE WILL BE CORRECTED. NO
ORAL OR WRITTEN INFORMATION OR ADVICE GIVEN BY APPLE, AN APPLE
AUTHORIZED REPRESENTATIVE OR ANY CONTRIBUTOR SHALL CREATE A WARRANTY.
You acknowledge that the Covered Code is not intended for use in the
operation of nuclear facilities, aircraft navigation, communication
systems, or air traffic control machines in which case the failure of
the Covered Code could lead to death, personal injury, or severe
physical or environmental damage.

9. LIMITATION OF LIABILITY. TO THE EXTENT NOT PROHIBITED BY LAW, IN NO
EVENT SHALL APPLE OR ANY CONTRIBUTOR BE LIABLE FOR ANY INCIDENTAL,
SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATING
TO THIS LICENSE OR YOUR USE OR INABILITY TO USE THE COVERED CODE, OR
ANY PORTION THEREOF, WHETHER UNDER A THEORY OF CONTRACT, WARRANTY,
TORT (INCLUDING NEGLIGENCE), PRODUCTS LIABILITY OR OTHERWISE, EVEN IF
APPLE OR SUCH CONTRIBUTOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES AND NOTWITHSTANDING THE FAILURE OF ESSENTIAL PURPOSE OF ANY
REMEDY. SOME JURISDICTIONS DO NOT ALLOW THE LIMITATION OF LIABILITY OF
INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS LIMITATION MAY NOT APPLY
TO YOU. In no event shall Apple's total liability to You for all
damages (other than as may be required by applicable law) under this
License exceed the amount of fifty dollars ($50.00).

10. Trademarks. This License does not grant any rights to use the
trademarks or trade names "Apple", "Apple Computer", "Mac", "Mac OS",
"QuickTime", "QuickTime Streaming Server" or any other trademarks,
service marks, logos or trade names belonging to Apple (collectively
"Apple Marks") or to any trademark, service mark, logo or trade name
belonging to any Contributor. You agree not to use any Apple Marks in
or as part of the name of products derived from the Original Code or
to endorse or promote products derived from the Original Code other
than as expressly permitted by and in strict compliance at all times
with Apple's third party trademark usage guidelines which are posted
at http://www.apple.com/legal/guidelinesfor3rdparties.html.

11. Ownership. Subject to the licenses granted under this License,
each Contributor retains all rights, title and interest in and to any
Modifications made by such Contributor. Apple retains all rights,
title and interest in and to the Original Code and any Modifications
made by or on behalf of Apple ("Apple Modifications"), and such Apple
Modifications will not be automatically subject to this License. Apple
may, at its sole discretion, choose to license such Apple
Modifications under this License, or on different terms from those
contained in this License or may choose not to license them at all.

12. Termination.

12.1 Termination. This License and the rights granted hereunder will
terminate:

(a) automatically without notice from Apple if You fail to comply with
any term(s) of this License and fail to cure such breach within 30
days of becoming aware of such breach;

(b) immediately in the event of the circumstances described in Section
13.5(b); or

(c) automatically without notice from Apple if You, at any time during
the term of this License, commence an action for patent infringement
against Apple; provided that Apple did not first commence
an action for patent infringement against You in that instance.

12.2 Effect of Termination. Upon termination, You agree to immediately
stop any further use, reproduction, modification, sublicensing and
distribution of the Covered Code. All sublicenses to the Covered Code
which have been properly granted prior to termination shall survive
any termination of this License. Provisions which, by their nature,
should remain in effect beyond the termination of this License shall
survive, including but not limited to Sections 3, 5, 8, 9, 10, 11,
12.2 and 13. No party will be liable to any other for compensation,
indemnity or damages of any sort solely as a result of terminating
this License in accordance with its terms, and termination of this
License will be without prejudice to any other right or remedy of
any party.

13. Miscellaneous.

13.1 Government End Users. The Covered Code is a "commercial item" as
defined in FAR 2.101. Government software and technical data rights in
the Covered Code include only those rights customarily provided to the
public as defined in this License. This customary commercial license
in technical data and software is provided in accordance with FAR
12.211 (Technical Data) and 12.212 (Computer Software) and, for
Department of Defense purchases, DFAR 252.227-7015 (Technical Data --
Commercial Items) and 227.7202-3 (Rights in Commercial Computer
Software or Computer Software Documentation). Accordingly, all U.S.
Government End Users acquire Covered Code with only those rights set
forth herein.

13.2 Relationship of Parties. This License will not be construed as
creating an agency, partnership, joint venture or any other form of
legal association between or among You, Apple or any Contributor, and
You will not represent to the contrary, whether expressly, by
implication, appearance or otherwise.

13.3 Independent Development. Nothing in this License will impair
Apple's right to acquire, license, develop, have others develop for
it, market and/or distribute technology or products that perform the
same or similar functions as, or otherwise compete with,
Modifications, Larger Works, technology or products that You may
develop, produce, market or distribute.

13.4 Waiver; Construction. Failure by Apple or any Contributor to
enforce any provision of this License will not be deemed a waiver of
future enforcement of that or any other provision. Any law or
regulation which provides that the language of a contract shall be
construed against the drafter will not apply to this License.

13.5 Severability. (a) If for any reason a court of competent
jurisdiction finds any provision of this License, or portion thereof,
to be unenforceable, that provision of the License will be enforced to
the maximum extent permissible so as to effect the economic benefits
and intent of the parties, and the remainder of this License will
continue in full force and effect. (b) Notwithstanding the foregoing,
if applicable law prohibits or restricts You from fully and/or
specifically complying with Sections 2 and/or 3 or prevents the
enforceability of either of those Sections, this License will
immediately terminate and You must immediately discontinue any use of
the Covered Code and destroy all copies of it that are in your
possession or control.

13.6 Dispute Resolution. Any litigation or other dispute resolution
between You and Apple relating to this License shall take place in the
Northern District of California, and You and Apple hereby consent to
the personal jurisdiction of, and venue in, the state and federal
courts within that District with respect to this License. The
application of the United Nations Convention on Contracts for the
International Sale of Goods is expressly excluded.

13.7 Entire Agreement; Governing Law. This License constitutes the
entire agreement between the parties with respect to the subject
matter hereof. This License shall be governed by the laws of the
United States and the State of California, except that body of
California law concerning conflicts of law.

Where You are located in the province of Quebec, Canada, the following
clause applies: The parties hereby confirm that they have requested
that this License and all related documents be drafted in English. Les
parties ont exige que le present contrat et tous les documents
connexes soient rediges en anglais.

EXHIBIT A.

"Portions Copyright (c) 1999-2003 Apple Computer, Inc. All Rights
Reserved.

This file contains Original Code and/or Modifications of Original Code
as defined in and that are subject to the Apple Public Source License
Version 2.0 (the 'License'). You may not use this file except in
compliance with the License. Please obtain a copy of the License at
http://www.opensource.apple.com/apsl/ and read it before using this
file.

The Original Code and all software distributed under the License are
distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
Please see the License for the specific language governing rights and
limitations under the License."


Samples

The following code samples can be found in the Samples folder in the AXIS Camera Management SDK Start Menu entry or in the installation folder. Since most samples is device dependent it is crucial to modify the ConnectionInfo before a sample is tested. The samples are written in C#, and a subset in C++.

AssignIP

These examples will show how AssignIP is intended to be used. The samples will demonstrate how to:

  • Set IP address.
  • Enable DHCP.
Note: Beware that misuse of AssignIP may result in devices becoming inaccessible depending on the network structure.

Config

These examples will show how getting and setting parameters in an Axis device is performed. The samples are divided into four different areas:

  • Get parameters.
  • Set parameters.
  • Get parameter definitions (only supported by firmware versions 4.40 and higher).
  • Set date and time.

Discover

These examples will let the user search for Axis devices on the network. The search can be performed in three ways:

  • Searching the local subnet using multicast Bonjour and SSDP.
  • Searching an IP range using unicast Bonjour.
  • Search one IP address using HTTP/HTTPS.
Note: When adding the .NET interface (DeviceMgr.dll) as a reference to a .NET project, Visual Studio will automatically add the depending files to your project, however it will not include the Bonjour.dll file. This file has to be added to your build output path using a pre/post build step.

Imaging

This example will retrieve a snapshot image from an Axis device, letting the user save it to disk or handle the image byte array himself.

Maintenance

These Maintenance examples are divided into two different areas:

  • Setting factory default. Hard factory default will reset all parameters to original factory settings, while normal factory default will reset all but TCP/IP settings to original factory settings.
  • Restart device.

Operation

This example will show how functions are added to Operations, in parallel or sequence, and then started using OperationMgr. It is an advanced sample showing all benefits with asynchronous requests.

Pinger

This example will let the user ping an IP address on the network.

Status

This example will show the user how to monitor the status of Axis devices. Status will report if the device is alive or not accessible at user specified time intervals.

Template

This example will let the user apply a template to an Axis device. A template can contain both parameters and functions (e.g. restart). A template will facilitate complex device modifications otherwise requiring user input.

Update

This example will allow the user to update and download available software from Axis web site. It requires a registered MyAxis account. Click here to register.

Upgrade

This example will let the user upload a firmware file to an Axis device and follow the progress. After upgrading, the new firmware version will be returned along with the upgrade result. If the upgrade failed, the reason for the failure will be reported. This sample is advanced but shows all benefits with asynchronous requests.

User Management

These examples handle user management in an Axis device. They are divided into three different areas:

  • Get and list existing users including access level (e.g. operator) and PTZ support.
  • Set a new user or modify an existing.
  • Remove a user.

    Note: It is prohibited by Axis devices to remove the user root.

The information contained herein is provided for reference only. Axis Communications AB makes no warranties or claims for the suitability or correctness of this information for third party developed applications. Axis does however, provide development support through its Application Development Partner Program. More information about the ADP program can be found at www.axis.com/partner/adp_intro.htm.

Copyright (C) 2005-2006 Axis Communications AB. All rights reserved.


Visual C# Samples

All C# code samples can, after compilation, be run either from VS2005 or command prompt in the console. They are using the .NET framework 2.0 and can be found in the Samples folder in the AXIS Camera Management SDK Start Menu entry, or in the installation folder.

Copyright (C) 2005-2006 Axis Communications AB. All rights reserved.


Assign IP Samples

These two samples will demonstrate how to modify the IP address by:
  • Setting an IP address.
  • Enabling DHCP.

Be aware that assigning an invalid IP address or modifying a NAT device may result in the device becoming inaccessible depending on the network structure.

Copyright (C) 2005-2006 Axis Communications AB. All rights reserved.


Config Samples

These four samples will demonstrate how to set and get parameters from an Axis device:
  • Get parameters: Two parameters, Image.I0.Text.TextEnabled (indicating whether text should be visible in video feed) and Image.I0.Text.String (text in video feed), are read from a device.
  • Set parameters: The two parameters got in previous sample are now set. The effect of the sample is visible both in the device's parameter list as well as in Live View homepage.
  • Get parameter definitions: Different models, as well as same models but different firmware versions, can have different sets of parameters. This sample extracts all static parameters and the dynamic parameters that exist at the moment when the sample is run.
  • Set date and time: This sample sets a specified date and time on a device.

Copyright (C) 2005-2006 Axis Communications AB. All rights reserved.


Discover Samples

These three samples will in different ways search the network for Axis devices:
  • Search local will discover all devices on the local network configured to respond to multicast Bonjour and SSDP.
  • Search IP range will discover devices in a given range if they are configured to respond to unicast Bonjour. The run-time for this sample depends on the size of the range and the user defined transmit rate.
  • Search address will decide if an specified IP address or hostname is occupied by an Axis device using HTTP or HTTPS.

Copyright (C) 2005-2006 Axis Communications AB. All rights reserved.


Maintenance Samples

These two samples handle restarting and setting factory default. There are two methods of setting factory default:
  • Hard: Reset all parameters to original factory settings.
  • Normal: Reset all, except TCP/IP settings, to original factory settings.

Copyright (C) 2005-2006 Axis Communications AB. All rights reserved.


User Management Samples

These three samples handles user management in Axis devices:
  • Get users: The existing users of a device are listed. A user is described by a username, password, access rights and PTZ control. The only parameter not listed is the password, since it is considered a security risk to send that information from a device to a client.
  • Set user: A specified user is created or modified, depending on if it existed prior or not.
  • Remove user: A specified user is removed.

Copyright (C) 2005-2006 Axis Communications AB. All rights reserved.


C++ Samples

All C++ code samples can, after compilation, be run from either VS2005 or a command prompt in the console. They are using native C++ and mixed mode C++ and can be found in the Samples folder in the AXIS Camera Management SDK Start Menu entry, or in the installation folder.

CppDeviceMgr

This is a mixed mode wrapper DLL that implements the basic data structures used in the .NET SDK as well as a few of the various features of the SDK. The interface exposed by this DLL can be used from a regular native C++ windows application. This is the foundation for the other C++ samples, which only use pure native C++ and don't need to know anything about .NET.

Copyright (C) 2005-2006 Axis Communications AB. All rights reserved.


DeviceMgr

AXIS Camera Management SDK 2.00

DeviceMgr Namespace

The DeviceMgr namespace is intended to be used from .NET platforms e.g., C# and Visual Basic .NET applications.

The component interfaces and classes are also described in Class Overview, where classes are arranged together with interfaces using them.

Note When adding the DeviceMgr.dll as a reference to a .NET project, Visual Studio will automatically add the depending files to your project, however it will not include the Bonjour.dll file. This file has to be added to your build output path using a pre/post build step.

Namespace hierarchy

Classes

Class | Description
AssignIP | Used when assigning IP addresses and enabling DHCP to devices on the network.
AvailableSoftware | Describes the available products with software on Axis web site and is used via Update.
Config | Used when getting and setting parameter values as well as date and time.
ConnectionInfo | Describes how a device on the network is accessed with e.g. address and port number.
Discover | Used when discovering and searching for devices on the network.
DiscoveredDevice | Containing parameters and values received from device discovered with Discover
DiscoveredDeviceList | A list of DiscoveredDevice objects.
DiscoverEventArgs | Provides data for the DiscoverUpdate event.
Imaging | Used when getting image snapshots from devices on the network. Snapshots from network cameras as well as video servers with multiple camera sources, e.g. AXIS 241Q, are supported.
Maintenance | Used for restarting and setting factory default.
Operation | Container created by OperationMgr for one or multiple functions that can be run in parallel or in sequence.
OperationMgr | Creates and manages Operation(s) and reports the progress.
Parameter | Containing Parameter names and values used by e.g. Config.
ParameterList | A list of Parameter objects.
Pinger | Used to determine if an IP address is in use.
Product | A product (e.g. AXIS 211) with compatible software returned by Update.
ProductList | A list of Product(s) with compatible software.
ProgressEventArgs | Provides data for ProgressEventHandler events sent by operations.
Result | Describing the status of a completed function or Operation.
ResultList | A list of Result(s).
ResultName | Listing possible Result.Name(s).
Settings | Contains methods for setting up the component environment.
Software | Product software (i.e. firmware) with a specific SoftwareVersion used in Update.
SoftwareList | A list of Software objects.
SoftwareVersion | A specific version of a Software object like e.g. 4.40.
Status | Used when monitoring Axis devices on the network.
StatusEventArgs | Provides data for the StatusUpdate event.
Template | Used when applying templates to Axis devices on the network.
TemplateConst | Containing constants used when building a Template.
Update | Used when downloading available software updates from Axis web site.
Upgrade | Used when upgrading firmware in an Axis device on the network.
User | Describes a user in an Axis device and is employed when adding or getting users via UserManagement.
UserList | A list of User(s).
UserManagement | Employed when getting, setting and removing users.

Delegates

Delegate | Description
DiscoveryEventHandler | Represents the method that will handle the DiscoverUpdate event of Discover.
ProgressEventHandler | Represents the method that will handle the ProgressUpdate event of a function or Operation.
StatusEventHandler | Represents the method that will handle the StatusUpdate event of Status.

Enumerations

Enumeration | Description
AccessRight | Level of access a user has to a device.
Protocol | Protocol used when communicating with device.
PtzRight | Access rights if a user is allowed to control a connected PTZ device.
ResultStatus | Describing the final function Result status.

Copyright (C) 2006 Axis Communications AB. All rights reserved.


AccessRight Enumeration

Level of access a user has to a device.

[Visual Basic]
Public Enum AccessRight
[C#]
public enum AccessRight

Remarks

Note Some devices, e.g. AXIS 206, does only present two levels of access rights when adding a user via the devices web site, Administrator and Viewer. Even though not exposed, the access level Operator is still supported.

Example

See user management samples (C#) on how to employ the User Management methods.

Members

Member Name | Description
Viewer | Can only access the video stream.
Operator | Can access the video stream, create and modify event types, and also modify all the settings not included in the System options.
Administrator | Has unrestricted access to the whole product, and can thus determine the registration of all other users.

Requirements

Namespace: DeviceMgr

Assembly: DeviceMgr (in DeviceMgr.dll)

See Also

DeviceMgr Namespace | UserManagement | User Management samples (C#)

Copyright (C) 2006 Axis Communications AB. All rights reserved.

Generated from assembly DeviceMgr [2.0.53.23801]


AssignIP Class

Used when assigning IP addresses and enabling DHCP to devices on the network.

For a list of all members of this type, see AssignIP Members.

System.Object
DeviceMgr.AssignIP

[Visual Basic]
Public Class AssignIP
[C#]
public class AssignIP

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

Assigning IP or enabling DHCP changes the physical address of a device. While the server is rebooting and updating its properties, it will be disconnected from the network, i.e. contact with device will be lost. BeginSetIP and SetIP will try to reconnect to the device after assignment, while BeginEnableDHCP and EnableDHCP wont since it is not possible to predict the new address of the device.

Example

See assign IP samples (C#) on how to use the AssignIP methods.

Requirements

Namespace: DeviceMgr

Assembly: DeviceMgr (in DeviceMgr.dll)

See Also

AssignIP Members | DeviceMgr Namespace | Assign IP samples (C#) | The Asynchronous Pattern


AssignIP Members

AssignIP overview

Public Static (Shared) Methods

AddEnableDHCP | Adds the function to enable DHCP to an existing Operation.
AddSetIP | Adds the function to assign an IP address to an existing Operation.

Public Instance Constructors

AssignIP Constructor Initializes a new instance of the AssignIP class.

Public Instance Methods

BeginEnableDHCP | Begins an asynchronous request for enabling DHCP on a device.
BeginSetIP | Begins an asynchronous request for assigning a new IP address to a device.
Cancel | Cancels an operation. Does not wait for the cancel to complete. Use End methods for waiting.
EnableDHCP | Enables DHCP on a device on the network.
EndEnableDHCP | Waits for BeginEnableDHCP to end and returns the Result.
EndSetIP | Waits for BeginSetIP to end and returns the Result.
SetIP | Assigns a new IP address to a device on the network.

Public Instance Events

ProgressUpdate Progress event during BeginSetIP and BeginEnableDHCP requests.

See Also

AssignIP Class | DeviceMgr Namespace | Assign IP samples (C#) | The Asynchronous Pattern


AssignIP Constructor

Initializes a new instance of the AssignIP class.

[Visual Basic]
Public Sub New()
[C#]
public AssignIP();

Example

See assign IP samples (C#) on how to use the AssignIP methods.

See Also

AssignIP Class | DeviceMgr Namespace | Assign IP samples (C#)


AssignIP Methods

The methods of the AssignIP class are listed below. For a complete list of AssignIP class members, see the AssignIP Members topic.

Public Static (Shared) Methods

AddEnableDHCP | Adds the function to enable DHCP to an existing Operation.
AddSetIP | Adds the function to assign an IP address to an existing Operation.

Public Instance Methods

BeginEnableDHCP | Begins an asynchronous request for enabling DHCP on a device.
BeginSetIP | Begins an asynchronous request for assigning a new IP address to a device.
Cancel | Cancels an operation. Does not wait for the cancel to complete. Use End methods for waiting.
EnableDHCP | Enables DHCP on a device on the network.
EndEnableDHCP | Waits for BeginEnableDHCP to end and returns the Result.
EndSetIP | Waits for BeginSetIP to end and returns the Result.
SetIP | Assigns a new IP address to a device on the network.

See Also

AssignIP Class | DeviceMgr Namespace | Assign IP samples (C#) | The Asynchronous Pattern


AssignIP.AddEnableDHCP Method

Adds the function to enable DHCP to an existing Operation.

[Visual Basic]
Public Shared Sub AddEnableDHCP( _
ByVal operation As Operation, _
ByVal connectionInfo As ConnectionInfo, _
ByVal state As Object _
)
[C#]
public static void AddEnableDHCP(
Operation operation,
ConnectionInfo connectionInfo,
object state
);

Parameters

operation
The operation this function is added to.
connectionInfo
The connection info used when accessing the device.
state
A user provided object that is passed to the method invoked when the asynchronous operation completes or in the result and can e.g. contain user state information.

Remarks

Setting DHCP may, depending on network structure and DHCP-server (or absence of), result in a situation where the device will become inaccessible because its unsolicited notification messages aren't received by ACM.

Note There will be no attempt to reconnect to the device after enabling DHCP.

Example

See assign IP samples (C#) on how to use the AssignIP methods.

See Also

AssignIP Class | DeviceMgr Namespace | Assign IP samples (C#)


AssignIP.AddSetIP Method

Adds the function to assign an IP address to an existing Operation.

[Visual Basic]
Public Shared Sub AddSetIP( _
ByVal operation As Operation, _
ByVal connectionInfo As ConnectionInfo, _
ByVal address As String, _
ByVal subnetMask As String, _
ByVal defaultRouter As String, _
ByVal state As Object _
)
[C#]
public static void AddSetIP(
Operation operation,
ConnectionInfo connectionInfo,
string address,
string subnetMask,
string defaultRouter,
object state
);

Parameters

operation
The operation this function is added to.
connectionInfo
The connection info used when accessing the device.
address
The new IP address.
subnetMask
The new subnet mask.
defaultRouter
The new default router.
state
A user provided object that is passed to the method invoked when the asynchronous operation completes or in the result and can e.g. contain user state information.

Remarks

Setting a new IP address, which is invalid on the local network, may result in a situation where the device will become inaccessible.

Note An attempt to reconnect to the device on the new IP address will be performed after the assignment.

Example

See assign IP samples (C#) on how to use the AssignIP methods.

See Also

AssignIP Class | DeviceMgr Namespace | Assign IP samples (C#)


AssignIP.BeginEnableDHCP Method

Begins an asynchronous request for enabling DHCP on a device.

[Visual Basic]
Public Function BeginEnableDHCP( _
ByVal connectionInfo As ConnectionInfo, _
ByVal callback As AsyncCallback, _
ByVal state As Object _
) As IAsyncResult
[C#]
public IAsyncResult BeginEnableDHCP(
ConnectionInfo connectionInfo,
AsyncCallback callback,
object state
);

Parameters

connectionInfo
The connection info used when accessing the device.
callback
The AsyncCallback delegate.
state
A user provided object that is passed to the method invoked when the asynchronous operation completes or in the result and can e.g. contain user state information.

Return Value

An IAsyncResult that references the asynchronous request.

Remarks

The BeginEnableDHCP method starts an asynchronous request for enabling DHCP. The callback method that implements the AsyncCallback delegate uses the EndEnableDHCP method to return Result.

Setting DHCP may, depending on network structure and DHCP-server (or absence of), result in a situation where the device will become inaccessible because its unsolicited notification messages aren't received by ACM.

Note There will be no attempt to reconnect to the device after enabling DHCP.

Example

See assign IP sample (C#) on how to enable DHCP on devices using the AssignIP methods.

See Also

AssignIP Class | DeviceMgr Namespace | Enable DHCP sample (C#) | The Asynchronous Pattern


AssignIP.BeginSetIP Method

Begins an asynchronous request for assigning a new IP address to a device.

[Visual Basic]
Public Function BeginSetIP( _
ByVal connectionInfo As ConnectionInfo, _
ByVal address As String, _
ByVal subnetMask As String, _
ByVal defaultRouter As String, _
ByVal callback As AsyncCallback, _
ByVal state As Object _
) As IAsyncResult
[C#]
public IAsyncResult BeginSetIP(
ConnectionInfo connectionInfo,
string address,
string subnetMask,
string defaultRouter,
AsyncCallback callback,
object state
);

Parameters

connectionInfo
The connection info used when accessing the device.
address
The new IP address.
subnetMask
The new subnet mask.
defaultRouter
The new default router.
callback
The AsyncCallback delegate.
state
A user provided object that is passed to the method invoked when the asynchronous operation completes or in the result and can e.g. contain user state information.

Return Value

An IAsyncResult that references the asynchronous request.

Remarks

The BeginSetIP method starts an asynchronous request for assigning a new IP address. The callback method that implements the AsyncCallback delegate uses the EndSetIP method to return Result.

Setting a new IP address, which is invalid in the local network, may result in a situation where the device will become inaccessible.

Note An attempt to reconnect to the device on the new IP address will be performed after the assignment.

Example

See assign IP sample (C#) on how to set IP addresses to devices using the AssignIP methods.

See Also

AssignIP Class | DeviceMgr Namespace | Set IP sample (C#) | The Asynchronous Pattern


AssignIP.Cancel Method

Cancels an operation. Does not wait for the cancel to complete. Use End methods for waiting.

[Visual Basic]
Public Sub Cancel( _
ByVal ar As IAsyncResult _
)
[C#]
public void Cancel(
IAsyncResult ar
);

Parameters

ar
The IAsyncResult handle returned by the corresponding Begin method.

Remarks

A Cancel call will not block and wait for the request to be canceled. Use asyncResult.AsyncWaitHandle.WaitOne(); or corresponding End method to wait for the request to be canceled or completed.

The returned values in the case of a subsequent corresponding End method depends on the timing of the Cancel call.

Note Canceling an ongoing request may produce an undefined result. For example, depending on the timing of the Cancel call, the request may have finished before the call could cancel it. Or in the case of an upgrade request, the firmware file may have been sent to the device, which will continue the upgrade even if the connection is disconnected by a cancel.

Example

See assign IP samples (C#) on how to use the AssignIP methods.

See Also

AssignIP Class | DeviceMgr Namespace | Assign IP samples (C#) | The Asynchronous Pattern


AssignIP.EnableDHCP Method

Enables DHCP on a device on the network.

[Visual Basic]
Public Function EnableDHCP( _
ByVal connectionInfo As ConnectionInfo _
) As Boolean
[C#]
public bool EnableDHCP(
ConnectionInfo connectionInfo
);

Parameters

connectionInfo
The connection info used when accessing the device.

Return Value

true if enabling DHCP succeeded; otherwise false.

Remarks

Setting DHCP may, depending on network structure and DHCP-server (or absence of), result in a situation where the device will become inaccessible because its unsolicited notification messages aren't received by ACM.

Note There will be no attempt to reconnect to the device after enabling DHCP.

Example

See assign IP samples (C#) on how to use the AssignIP methods.

See Also

AssignIP Class | DeviceMgr Namespace | Assign IP samples (C#)


AssignIP.EndEnableDHCP Method

Waits for BeginEnableDHCP to end and returns the Result.

[Visual Basic]
Public Function EndEnableDHCP( _
ByVal ar As IAsyncResult _
) As Result
[C#]
public Result EndEnableDHCP(
IAsyncResult ar
);

Parameters

ar
The IAsyncResult handle returned by the corresponding Begin method.

Return Value

The Result describing the function status.

Example

See assign IP sample (C#) on how to enable DHCP on devices using the AssignIP methods.

See Also

AssignIP Class | DeviceMgr Namespace | Enable DHCP sample (C#) | The Asynchronous Pattern


AssignIP.EndSetIP Method

Waits for BeginSetIP to end and returns the Result.

[Visual Basic]
Public Function EndSetIP( _
ByVal ar As IAsyncResult _
) As Result
[C#]
public Result EndSetIP(
IAsyncResult ar
);

Parameters

ar
The IAsyncResult handle returned by the corresponding Begin method.

Return Value

The Result describing the function status.

Example

See assign IP sample (C#) on how to set IP addresses to devices using the AssignIP methods.

See Also

AssignIP Class | DeviceMgr Namespace | Set IP sample (C#) | The Asynchronous Pattern


AssignIP.SetIP Method

Assigns a new IP address to a device on the network.

[Visual Basic]
Public Function SetIP( _
ByVal connectionInfo As ConnectionInfo, _
ByVal address As String, _
ByVal subnetMask As String, _
ByVal defaultRouter As String _
) As Boolean
[C#]
public bool SetIP(
ConnectionInfo connectionInfo,
string address,
string subnetMask,
string defaultRouter
);

Parameters

connectionInfo
The connection info used when accessing the device.
address
The new IP address.
subnetMask
The new subnet mask.
defaultRouter
The new default router.

Return Value

true if IP assignment succeeded; otherwise false.

Remarks

Setting a new IP address, which is invalid in the local network, may result in a situation where the device will become inaccessible.

Note An attempt to reconnect to the device on the new IP address will be performed after the assignment.

Example

See assign IP samples (C#) on how to use the AssignIP methods.

See Also

AssignIP Class | DeviceMgr Namespace | Assign IP samples (C#)


AssignIP Events

The events of the AssignIP class are listed below. For a complete list of AssignIP class members, see the AssignIP Members topic.

Public Instance Events

ProgressUpdate Progress event during BeginSetIP and BeginEnableDHCP requests.

See Also

AssignIP Class | DeviceMgr Namespace | Assign IP samples (C#) | The Asynchronous Pattern


AssignIP.ProgressUpdate Event

Progress event during BeginSetIP and BeginEnableDHCP requests.

[Visual Basic]
Public Event ProgressUpdate As ProgressEventHandler
[C#]
public event ProgressEventHandler ProgressUpdate;

Event Data

The event handler receives an argument of type ProgressEventArgs containing data related to this event. The following ProgressEventArgs properties provide information specific to this event.

Property | Description
AsyncState | Gets an object containing information about the ProgressEventArgs.
Progress | Gets the progress percent.

Example

See assign IP samples (C#) on how to use the AssignIP methods.

See Also

AssignIP Class | DeviceMgr Namespace | Assign IP samples (C#)


AvailableSoftware Class

Describes the available products with software on Axis web site and is used via Update.

For a list of all members of this type, see AvailableSoftware Members.

System.Object
DeviceMgr.AvailableSoftware

[Visual Basic]
Public Class AvailableSoftware
[C#]
public class AvailableSoftware

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

AvailableSoftware is a documentation of downloadable software from Axis web site as well as a timestamp when check was performed.

This class is part of a group of related classes used to query www.axis.com for available firmware updates.

The BeginGetAvailableSoftware method in the Update class is used to check for available firmware updates at www.axis.com and returns AvailableSoftware objects. AvailableSoftware contains a ProductList, which contains the list of available Product updates. Each Product has a name like e.g. "AXIS 211" and contains a SoftwareList, which is a list of available software (i.e. firmware files) for that product model. Each Software has a SoftwareVersion, e.g. 4.40.

With an AvailableSoftware object returned from the Update class it is possible to get the list of available firmware files (Software objects). These Software objects are then specified when downloading available software using the BeginDownload method in the Update class.

Example

See update sample (C#) on how to use the methods.

Requirements

Namespace: DeviceMgr

Assembly: DeviceMgr (in DeviceMgr.dll)

See Also

AvailableSoftware Members | DeviceMgr Namespace | Update | Update sample (C#)


AvailableSoftware Members

AvailableSoftware overview

Public Instance Constructors

AvailableSoftware Constructor Initializes a new instance of the AvailableSoftware class.

Public Instance Properties

Date | Gets the last time the available software were checked on Axis web site.
ProductList | Gets a list of available products with software available on Axis web site.

Public Instance Methods

ToString | Converts the value of this instance to a String containing the date of last modification and the available Product(s).
ToStringFormat | Converts AvailableSoftware to a String format.

See Also

AvailableSoftware Class | DeviceMgr Namespace | Update | Update sample (C#)


AvailableSoftware Constructor

Initializes a new instance of the AvailableSoftware class.

[Visual Basic]
Overloads Public Sub New( _
ByVal stringFormat As String _
)
[C#]
public AvailableSoftware(
string stringFormat
);

Parameters

stringFormat
The String representing the AvailableSoftware originate from AvailableSoftware.ToStringFormat.

Example

See update sample (C#) on how to use the methods.

See Also

AvailableSoftware Class | DeviceMgr Namespace | Update | Update sample (C#)


AvailableSoftware Properties

The properties of the AvailableSoftware class are listed below. For a complete list of AvailableSoftware class members, see the AvailableSoftware Members topic.

Public Instance Properties

Date | Gets the last time the available software were checked on Axis web site.
ProductList | Gets a list of available products with software available on Axis web site.

See Also

AvailableSoftware Class | DeviceMgr Namespace | Update | Update sample (C#)


Date Property

AXIS Camera Management SDK 2.00

AvailableSoftware.Date Property

Gets the last time the available software were checked on Axis web site.

[Visual Basic]
Public ReadOnly Property Date As String
[C#]
public string Date {get;}

Property Value

The last time the available software were checked on Axis web site.

Example

See update sample (C#) on how to use the methods.

See Also

AvailableSoftware Class | DeviceMgr Namespace | Update | Update sample (C#)


ProductList Property

AXIS Camera Management SDK 2.00

AvailableSoftware.ProductList Property

Gets a list of available products with software available on Axis web site.

[Visual Basic]
Public ReadOnly Property ProductList As ProductList
[C#]
public ProductList ProductList {get;}

Property Value

The list of available products with software available on Axis web site.

Example

See update sample (C#) on how to use the methods.

See Also

AvailableSoftware Class | DeviceMgr Namespace | Update | Update sample (C#)


AvailableSoftware Methods

The methods of the AvailableSoftware class are listed below. For a complete list of AvailableSoftware class members, see the AvailableSoftware Members topic.

Public Instance Methods

ToString | Converts the value of this instance to a String containing the date of last modification and the available Product(s).
ToStringFormat | Converts AvailableSoftware to a String format.

See Also

AvailableSoftware Class | DeviceMgr Namespace | Update | Update sample (C#)


AvailableSoftware.ToString Method

Converts the value of this instance to a String containing the date of last modification and the available Product(s).

[Visual Basic]
Overrides Public Function ToString() As String
[C#]
public override string ToString();

Return Value

A String whose value represents the available products with software.

Example

See update sample (C#) on how to use the methods.

See Also

AvailableSoftware Class | DeviceMgr Namespace | Update | Update | Update sample (C#)


AvailableSoftware.ToStringFormat Method

Converts AvailableSoftware to a String format.

[Visual Basic]
Public Function ToStringFormat() As String
[C#]
public string ToStringFormat();

Return Value

A String that can be used to recreate an AvailableSoftware object later by using the String as an argument in the constructor.

Example

See update sample (C#) on how to use the methods.

See Also

AvailableSoftware Class | DeviceMgr Namespace | Update | Update sample (C#)


Config Class

Used when getting and setting parameter values as well as date and time.

For a list of all members of this type, see Config Members.

System.Object
DeviceMgr.Config

[Visual Basic]
Public Class Config
[C#]
public class Config

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

Some parameters in a device, e.g. Brand.Brand and Properties.Firmware.Version, are read-only and cannot be set. To know what security levels a parameter have, get the parameter descriptions by using BeginGetParameterInfo or GetParameterInfo.

Note It is better to ask for a parameter group instead of asking for many parameters in the same group. The parameters and groups in an Axis device are defined in the Axis Video Parameters specification. The parameter name prefix "root." is obsolete. If the component receives a parameter with this prefix, the prefix will be removed.

Example

See config samples (C#) on how to use the Config methods.

Requirements

Namespace: DeviceMgr

Assembly: DeviceMgr (in DeviceMgr.dll)

See Also

Config Members | DeviceMgr Namespace | Config samples (C#) | The Asynchronous Pattern | Axis Video Parameters


Config Members

Config overview

Public Static (Shared) Methods

AddGet | Adds the function to get parameters and/or groups to an existing Operation.
AddGetParameterInfo | Adds the function to get parameter definitions to an existing Operation.
AddSet | Adds the function to set parameters to an existing Operation.
AddSetDateTime | Adds the function to set setting date and time to an existing Operation.
GetParameterInfo | Overloaded. Extracts the parameter definitions from a Result.
GetParameterList | Extracts the parameter list from a Result.

Public Instance Constructors

Config Constructor Initializes a new instance of the Config class.

Public Instance Methods

BeginGet | Begins an asynchronous request for getting parameters and/or groups.
BeginGetParameterInfo | Begins an asynchronous request for getting the parameter definitions.
BeginSet | Begins an asynchronous request for setting parameters.
BeginSetDateTime | Begins an asynchronous request for setting date and time.
Cancel | Cancels an operation. Does not wait for the cancel to complete. Use End methods for waiting.
EndGet | Waits for BeginGet to end and returns the parameters and the Result.
EndGetParameterInfo | Waits for BeginGetParameterInfo to end and returns the parameter definitions as a String.
EndSet | Waits for BeginSet to end and returns the Result.
EndSetDateTime | Waits for BeginSetDateTime to end and returns the Result.
Get | Gets the values of parameters and/or groups specified in a ParameterList.
GetParameterInfo | Overloaded. Gets the parameter info.
Set | Sets the values of parameters specified in a ParameterList.
SetDateTime | Sets the date and time.

Public Instance Events

ProgressUpdate Progress event during a BeginGet, BeginSet, BeginGetParameterInfo, BeginSetDateTime requests.

See Also

Config Class | DeviceMgr Namespace | Config samples (C#) | The Asynchronous Pattern | Axis Video Parameters


Config Constructor

Initializes a new instance of the Config class.

[Visual Basic]
Public Sub New()
[C#]
public Config();

Example

See config samples (C#) on how to use the Config methods.

See Also

Config Class | DeviceMgr Namespace | Config samples (C#) | Axis Video Parameters


Config Methods

The methods of the Config class are listed below. For a complete list of Config class members, see the Config Members topic.

Public Static (Shared) Methods

AddGet | Adds the function to get parameters and/or groups to an existing Operation.
AddGetParameterInfo | Adds the function to get parameter definitions to an existing Operation.
AddSet | Adds the function to set parameters to an existing Operation.
AddSetDateTime | Adds the function to set setting date and time to an existing Operation.
GetParameterInfo | Overloaded. Extracts the parameter definitions from a Result.
GetParameterList | Extracts the parameter list from a Result.

Public Instance Methods

BeginGet | Begins an asynchronous request for getting parameters and/or groups.
BeginGetParameterInfo | Begins an asynchronous request for getting the parameter definitions.
BeginSet | Begins an asynchronous request for setting parameters.
BeginSetDateTime | Begins an asynchronous request for setting date and time.
Cancel | Cancels an operation. Does not wait for the cancel to complete. Use End methods for waiting.
EndGet | Waits for BeginGet to end and returns the parameters and the Result.
EndGetParameterInfo | Waits for BeginGetParameterInfo to end and returns the parameter definitions as a String.
EndSet | Waits for BeginSet to end and returns the Result.
EndSetDateTime | Waits for BeginSetDateTime to end and returns the Result.
Get | Gets the values of parameters and/or groups specified in a ParameterList.
GetParameterInfo | Overloaded. Gets the parameter info.
Set | Sets the values of parameters specified in a ParameterList.
SetDateTime | Sets the date and time.

See Also

Config Class | DeviceMgr Namespace | Config samples (C#) | The Asynchronous Pattern | Axis Video Parameters


Config.AddGet Method

Adds the function to get parameters and/or groups to an existing Operation.

[Visual Basic]
Public Shared Sub AddGet( _
ByVal operation As Operation, _
ByVal connectionInfo As ConnectionInfo, _
ByVal parameterList As ParameterList, _
ByVal state As Object _
)
[C#]
public static void AddGet(
Operation operation,
ConnectionInfo connectionInfo,
ParameterList parameterList,
object state
);

Parameters

operation
The operation this function is added to.
connectionInfo
The connection info used when accessing the device.
parameterList
The list of parameter and/or group names to get.
state
A user provided object that is passed to the method invoked when the asynchronous operation completes or in the result and can e.g. contain user state information.

Remarks

Note It is better to ask for a parameter group instead of asking for many parameters in the same group. The parameters and groups in an Axis device are defined in the Axis Video Parameters specification. The parameter name prefix "root." is obsolete. If the component receives a parameter with this prefix, the prefix will be removed.

Example

See config samples (C#) on how to use the Config methods.

See Also

Config Class | DeviceMgr Namespace | Config samples (C#) | Axis Video Parameters


Config.AddGetParameterInfo Method

Adds the function to get parameter definitions to an existing Operation.

[Visual Basic]
Public Shared Sub AddGetParameterInfo( _
ByVal operation As Operation, _
ByVal connectionInfo As ConnectionInfo, _
ByVal state As Object _
)
[C#]
public static void AddGetParameterInfo(
Operation operation,
ConnectionInfo connectionInfo,
object state
);

Parameters

operation
The operation this function is added to.
connectionInfo
The connection info used when accessing the device.
state
A user provided object that is passed to the method invoked when the asynchronous operation completes or in the result and can e.g. contain user state information.

Remarks

The received XML contains all static parameters and the dynamic parameters that exists at the moment when the request is performed.

Note This functionality is only supported by firmware versions 4.40 and higher.

Example

See config samples (C#) on how to use the Config methods.

See Also

Config Class | DeviceMgr Namespace | Config samples (C#) | Axis Video Parameters


Config.AddSet Method

Adds the function to set parameters to an existing Operation.

[Visual Basic]
Public Shared Sub AddSet( _
ByVal operation As Operation, _
ByVal connectionInfo As ConnectionInfo, _
ByVal parameterList As ParameterList, _
ByVal state As Object _
)
[C#]
public static void AddSet(
Operation operation,
ConnectionInfo connectionInfo,
ParameterList parameterList,
object state
);

Parameters

operation
The operation this function is added to.
connectionInfo
The connection info used when accessing the device.
parameterList
The list of parameter names and values to set.
state
A user provided object that is passed to the method invoked when the asynchronous operation completes or in the result and can e.g. contain user state information.

Remarks

It is not recommended to set a new IP address using Config, use AssignIP instead.

Example

See config samples (C#) on how to use the Config methods.

See Also

Config Class | DeviceMgr Namespace | Config samples (C#) | Axis Video Parameters


Config.AddSetDateTime Method

Adds the function to set setting date and time to an existing Operation.

[Visual Basic]
Public Shared Sub AddSetDateTime( _
ByVal operation As Operation, _
ByVal connectionInfo As ConnectionInfo, _
ByVal date As String, _
ByVal time As String, _
ByVal state As Object _
)
[C#]
public static void AddSetDateTime(
Operation operation,
ConnectionInfo connectionInfo,
string date,
string time,
object state
);

Parameters

operation
The operation this function is added to.
connectionInfo
The connection info used when accessing the device.
date
The date in format yyyy-MM-dd, or "TODAY".
time
The time in format HH:mm:ss, or "NOW".
state
A user provided object that is passed to the method invoked when the asynchronous operation completes or in the result and can e.g. contain user state information.

Remarks

Explanation of the date and time formats:

  • yyyy - The year, including the century, between 1970 - 2031.
  • MM - The month, measured as a number between 1 and 12.
  • dd - The day of the month, measured as a number between 1 and 31.
  • HH - The hour, in the range 0-23.
  • mm - The minute, in the range 0-59.
  • ss - The seconds, in the range 0-59.
  • TODAY - Sets the date to the current date in the computer.
  • NOW - Sets the time to the current time in the computer.

Example

See config samples (C#) on how to use the Config methods.

See Also

Config Class | DeviceMgr Namespace | Config samples (C#) | Axis Video Parameters


Config.BeginGet Method

Begins an asynchronous request for getting parameters and/or groups.

[Visual Basic]
Public Function BeginGet( _
ByVal connectionInfo As ConnectionInfo, _
ByVal parameterList As ParameterList, _
ByVal callback As AsyncCallback, _
ByVal state As Object _
) As IAsyncResult
[C#]
public IAsyncResult BeginGet(
ConnectionInfo connectionInfo,
ParameterList parameterList,
AsyncCallback callback,
object state
);

Parameters

connectionInfo
The connection info used when accessing the device.
parameterList
The list of parameter and/or group names to get.
callback
The AsyncCallback delegate.
state
A user provided object that is passed to the method invoked when the asynchronous operation completes or in the result and can e.g. contain user state information.

Return Value

A list of parameter names and values.

Remarks

The BeginGet method starts an asynchronous request for getting parameters and/or groups. The callback method that implements the AsyncCallback delegate uses the EndGet method to return a list of parameter names and their values.

Note It is better to ask for a parameter group instead of asking for many parameters in the same group. The parameters and groups in an Axis device are defined in the Axis Video Parameters specification. The parameter name prefix "root." is obsolete. If the component receives a parameter with this prefix, the prefix will be removed.

Example

See config sample (C#) on how to get parameters using the Config methods.

See Also

Config Class | DeviceMgr Namespace | Get parameters sample (C#) | The Asynchronous Pattern | Axis Video Parameters


Config.BeginGetParameterInfo Method

Begins an asynchronous request for getting the parameter definitions.

[Visual Basic]
Public Function BeginGetParameterInfo( _
ByVal connectionInfo As ConnectionInfo, _
ByVal callback As AsyncCallback, _
ByVal state As Object _
) As IAsyncResult
[C#]
public IAsyncResult BeginGetParameterInfo(
ConnectionInfo connectionInfo,
AsyncCallback callback,
object state
);

Parameters

connectionInfo
The connection info used when accessing the device.
callback
The AsyncCallback delegate.
state
A user provided object that is passed to the method invoked when the asynchronous operation completes or in the result and can e.g. contain user state information.

Return Value

An IAsyncResult that references the asynchronous request.

Remarks

The BeginGetParameterInfo method starts an asynchronous request for getting the parameter definitions. The callback method that implements the AsyncCallback delegate uses the EndGetParameterInfo method to return the parameter definitions as a String.

The received XML contains all static parameters and the dynamic parameters that exists at the moment when the request is performed.

Note This functionality is only supported by firmware versions 4.40 and higher.

Example

See config sample (C#) on how to get parameter definitions using the Config methods.

See Also

Config Class | DeviceMgr Namespace | Get parameter info sample (C#) | The Asynchronous Pattern | Axis Video Parameters


Config.BeginSet Method

Begins an asynchronous request for setting parameters.

[Visual Basic]
Public Function BeginSet( _
ByVal connectionInfo As ConnectionInfo, _
ByVal parameterList As ParameterList, _
ByVal callback As AsyncCallback, _
ByVal state As Object _
) As IAsyncResult
[C#]
public IAsyncResult BeginSet(
ConnectionInfo connectionInfo,
ParameterList parameterList,
AsyncCallback callback,
object state
);

Parameters

connectionInfo
The connection info used when accessing the device.
parameterList
The list of parameter names and values to set.
callback
The AsyncCallback delegate.
state
A user provided object that is passed to the method invoked when the asynchronous operation completes or in the result and can e.g. contain user state information.

Return Value

An IAsyncResult that references the asynchronous request.

Remarks

The BeginSet method starts an asynchronous request for setting parameters. The callback method that implements the AsyncCallback delegate uses the EndSet method to return the Result.

It is not recommened to set a new IP address using Config, use AssignIP instead.

Example

See config sample (C#) on how to set parameters using the Config methods.

See Also

Config Class | DeviceMgr Namespace | Set parameters sample (C#) | The Asynchronous Pattern | Axis Video Parameters


Config.BeginSetDateTime Method

Begins an asynchronous request for setting date and time.

[Visual Basic]
Public Function BeginSetDateTime( _
ByVal connectionInfo As ConnectionInfo, _
ByVal date As String, _
ByVal time As String, _
ByVal callback As AsyncCallback, _
ByVal state As Object _
) As IAsyncResult
[C#]
public IAsyncResult BeginSetDateTime(
ConnectionInfo connectionInfo,
string date,
string time,
AsyncCallback callback,
object state
);

Parameters

connectionInfo
The connection info used when accessing the device.
date
The date in format yyyy-MM-dd, or "TODAY".
time
The time in format HH:mm:ss, or "NOW".
callback
The AsyncCallback delegate.
state
A user provided object that is passed to the method invoked when the asynchronous operation completes or in the result and can e.g. contain user state information.

Return Value

An IAsyncResult that references the asynchronous request.

Remarks

The BeginSetDateTime method starts an asynchronous request for setting date and time. The callback method that implements the AsyncCallback delegate uses the EndSetDateTime method to return the Result.

Explanation of the date and time formats:

  • yyyy - The year, including the century, between 1970 - 2031.
  • MM - The month, measured as a number between 1 and 12.
  • dd - The day of the month, measured as a number between 1 and 31.
  • HH - The hour, in the range 0-23.
  • mm - The minute, in the range 0-59.
  • ss - The seconds, in the range 0-59.
  • TODAY - Sets the date to the current date in the computer.
  • NOW - Sets the time to the current time in the computer.

Example

See config sample (C#) on how to set date and time using the Config methods.

See Also

Config Class | DeviceMgr Namespace | Set date and time sample (C#) | The Asynchronous Pattern | Axis Video Parameters


Config.Cancel Method

Cancels an operation. Does not wait for the cancel to complete. Use End methods for waiting.

[Visual Basic]
Public Sub Cancel( _
ByVal ar As IAsyncResult _
)
[C#]
public void Cancel(
IAsyncResult ar
);

Parameters

ar
The IAsyncResult handle returned by the corresponding Begin method.

Remarks

A Cancel call will not block and wait for the request to be canceled. Use asyncResult.AsyncWaitHandle.WaitOne(); or corresponding End method to wait for the request to be canceled or completed.

The returned values in the case of a subsequent corresponding End method depends on the timing of the Cancel call.

Note Canceling an ongoing request may produce an undefined result. For example, depending on the timing of the Cancel call, the request may have finished before the call could cancel it. Or in the case of an upgrade request, the firmware file may have been sent to the device, which will continue the upgrade even if the connection is disconnected by a cancel.

Example

See config samples (C#) on how to use the Config methods.

See Also

Config Class | DeviceMgr Namespace | Config samples (C#) | The Asynchronous Pattern | Axis Video Parameters


Config.EndGet Method

Waits for BeginGet to end and returns the parameters and the Result.

[Visual Basic]
Public Function EndGet( _
ByVal ar As IAsyncResult, _
ByRef parameterList As ParameterList _
) As Result
[C#]
public Result EndGet(
IAsyncResult ar,
out ParameterList parameterList
);

Parameters

ar
The IAsyncResult handle returned by the corresponding Begin method.
parameterList
The list of parameter names and values.

Return Value

The Result describing the function status.

Example

See config sample (C#) on how to get parameters using the Config methods.

See Also

Config Class | DeviceMgr Namespace | Get parameters sample (C#) | The Asynchronous Pattern | Axis Video Parameters


Config.EndGetParameterInfo Method

Waits for BeginGetParameterInfo to end and returns the parameter definitions as a String.

[Visual Basic]
Public Function EndGetParameterInfo( _
ByVal ar As IAsyncResult, _
ByRef result As Result _
) As String
[C#]
public string EndGetParameterInfo(
IAsyncResult ar,
out Result result
);

Parameters

ar
The IAsyncResult handle returned by the corresponding Begin method.
result
The Result describing the function status.

Return Value

A XML String representing parameter definitions in a Axis video device if Config was successful; otherwise null.

Example

See config sample (C#) on how to get parameter definitions using the Config methods.

See Also

Config Class | DeviceMgr Namespace | Get parameter info sample (C#) | The Asynchronous Pattern | Axis Video Parameters


Config.EndSet Method

Waits for BeginSet to end and returns the Result.

[Visual Basic]
Public Function EndSet( _
ByVal ar As IAsyncResult _
) As Result
[C#]
public Result EndSet(
IAsyncResult ar
);

Parameters

ar
The IAsyncResult handle returned by the corresponding Begin method.

Return Value

The Result describing the function status.

Remarks

Note It is better to ask for a parameter group instead of asking for many parameters in the same group. The parameters and groups in an Axis device are defined in the Axis Video Parameters specification. The parameter name prefix "root." is obsolete. If the component receives a parameter with this prefix, the prefix will be removed.

Example

See config sample (C#) on how to set parameters using the Config methods.

See Also

Config Class | DeviceMgr Namespace | Set parameters sample (C#) | The Asynchronous Pattern | Axis Video Parameters


Config.EndSetDateTime Method

Waits for BeginSetDateTime to end and returns the Result.

[Visual Basic]
Public Function EndSetDateTime( _
ByVal ar As IAsyncResult _
) As Result
[C#]
public Result EndSetDateTime(
IAsyncResult ar
);

Parameters

ar
The IAsyncResult handle returned by the corresponding Begin method.

Return Value

The Result describing the function status.

Example

See config sample (C#) on how to set date and time using the Config methods.

See Also

Config Class | DeviceMgr Namespace | Set date and time sample (C#) | The Asynchronous Pattern | Axis Video Parameters


Config.Get Method

Gets the values of parameters and/or groups specified in a ParameterList.

[Visual Basic]
Public Function Get( _
ByVal connectionInfo As ConnectionInfo, _
ByVal parameterList As ParameterList _
) As ParameterList
[C#]
public ParameterList Get(
ConnectionInfo connectionInfo,
ParameterList parameterList
);

Parameters

connectionInfo
The connection info used when accessing the device.
parameterList
The list of parameter names. Parameter values will be entered in the returned list.

Return Value

A list of parameter names and values if Config was successful; otherwise null.

Remarks

Note It is better to ask for a parameter group instead of asking for many parameters in the same group. The parameters and groups in an Axis device are defined in the Axis Video Parameters specification. The parameter name prefix "root." is obsolete. If the component receives a parameter with this prefix, the prefix will be removed.

Example

See config samples (C#) on how to use the Config methods.

See Also

Config Class | DeviceMgr Namespace | Config samples (C#) | Axis Video Parameters


GetParameterInfo Method

AXIS Camera Management SDK 2.00

Config.GetParameterInfo Method

Gets the parameter info.

Overload List

Gets the parameter info.

public string GetParameterInfo(ConnectionInfo);

Extracts the parameter definitions from a Result.

public static string GetParameterInfo(Result);

See Also

Config Class | DeviceMgr Namespace | Config samples (C#) | Axis Video Parameters


Config.GetParameterInfo Method (ConnectionInfo)

Gets the parameter info.

[Visual Basic]
Overloads Public Function GetParameterInfo( _
ByVal connectionInfo As ConnectionInfo _
) As String
[C#]
public string GetParameterInfo(
ConnectionInfo connectionInfo
);

Parameters

connectionInfo
The connection info used when accessing the device.

Return Value

A XML String representing parameter definitions in a Axis video device if Config was successful; otherwise null.

Remarks

The received XML contains all static parameters and the dynamic parameters that exists at the moment when the request is performed.

Note This functionality is only supported by firmware versions 4.40 and higher.

Example

See config samples (C#) on how to use the Config methods.

See Also

Config Class | DeviceMgr Namespace | Config.GetParameterInfo Overload List | Config samples (C#) | Axis Video Parameters


Config.GetParameterInfo Method (Result)

Extracts the parameter definitions from a Result.

[Visual Basic]
Overloads Public Shared Function GetParameterInfo( _
ByVal result As Result _
) As String
[C#]
public static string GetParameterInfo(
Result result
);

Parameters

result
The Result describing the function status.

Return Value

A XML String representing parameter definitions in a Axis video device if Config was successful; otherwise null.

Example

See config samples (C#) on how to use the Config methods.

See Also

Config Class | DeviceMgr Namespace | Config.GetParameterInfo Overload List | Config samples (C#) | Axis Video Parameters


Config.GetParameterList Method

Extracts the parameter list from a Result.

[Visual Basic]
Public Shared Function GetParameterList( _
ByVal result As Result _
) As ParameterList
[C#]
public static ParameterList GetParameterList(
Result result
);

Parameters

result
The Result describing the function status.

Return Value

A list of parameter names and values if Config was successful; otherwise null.

Example

See config samples (C#) on how to use the Config methods.

See Also

Config Class | DeviceMgr Namespace | Config samples (C#) | Axis Video Parameters


Config.Set Method

Sets the values of parameters specified in a ParameterList.

[Visual Basic]
Public Function Set( _
ByVal connectionInfo As ConnectionInfo, _
ByVal parameterList As ParameterList _
) As Result
[C#]
public Result Set(
ConnectionInfo connectionInfo,
ParameterList parameterList
);

Parameters

connectionInfo
The connection info used when accessing the device.
parameterList
The list of parameter names and values to set.

Return Value

The Result describing the function status.

Remarks

It is not recommended to set a new IP address using Config, use AssignIP instead.

Example

See config samples (C#) on how to use the Config methods.

See Also

Config Class | DeviceMgr Namespace | Config samples (C#) | Axis Video Parameters


Config.SetDateTime Method

Sets the date and time.

[Visual Basic]
Public Function SetDateTime( _
ByVal connectionInfo As ConnectionInfo, _
ByVal date As String, _
ByVal time As String _
) As Result
[C#]
public Result SetDateTime(
ConnectionInfo connectionInfo,
string date,
string time
);

Parameters

connectionInfo
The connection info used when accessing the device.
date
The date in format yyyy-MM-dd, or "TODAY".
time
The time in format HH:mm:ss, or "NOW".

Return Value

The Result describing the function status.

Remarks

Explanation of the date and time formats:

  • yyyy - The year, including the century between 1970 - 2031.
  • MM - The month, measured as a number between 1 and 12.
  • dd - The day of the month, measured as a number between 1 and 31.
  • HH - The hour, in the range 0-23.
  • mm - The minute, in the range 0-59.
  • ss - The seconds, in the range 0-59.

Example

See config samples (C#) on how to use the Config methods.

See Also

Config Class | DeviceMgr Namespace | Config samples (C#) | Axis Video Parameters


Config Events

The events of the Config class are listed below. For a complete list of Config class members, see the Config Members topic.

Public Instance Events

ProgressUpdate Progress event during a BeginGet, BeginSet, BeginGetParameterInfo, BeginSetDateTime requests.

See Also

Config Class | DeviceMgr Namespace | Config samples (C#) | The Asynchronous Pattern | Axis Video Parameters


Config.ProgressUpdate Event

Progress event during a BeginGet, BeginSet, BeginGetParameterInfo, BeginSetDateTime requests.

[Visual Basic]
Public Event ProgressUpdate As ProgressEventHandler
[C#]
public event ProgressEventHandler ProgressUpdate;

Event Data

The event handler receives an argument of type ProgressEventArgs containing data related to this event. The following ProgressEventArgs properties provide information specific to this event.

Property | Description
AsyncState | Gets an object containing information about the ProgressEventArgs.
Progress | Gets the progress percent.

Example

See config samples (C#) on how to use the Config methods.

See Also

Config Class | DeviceMgr Namespace | Config samples (C#)


ConnectionInfo Class

Describes how a device on the network is accessed with e.g. address and port number.

For a list of all members of this type, see ConnectionInfo Members.

System.Object
DeviceMgr.ConnectionInfo

[Visual Basic]
Public Class ConnectionInfo
[C#]
public class ConnectionInfo

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

ConnectionInfo is a bundle of parameters describing how the component should access a device on the network. Address and Port sets the destination, Protocol decides if communication should be encrypted, NetworkCredential are used to get authorized access, PingEnabled sets if the address should be pinged prior to sending request and ConnectionTimeout is a time-span before request connection attempt is canceled.

Requirements

Namespace: DeviceMgr

Assembly: DeviceMgr (in DeviceMgr.dll)

See Also

ConnectionInfo Members | DeviceMgr Namespace


ConnectionInfo Members

ConnectionInfo overview

Public Instance Constructors

ConnectionInfo Overloaded. Initializes a new instance of the ConnectionInfo class.

Public Instance Properties

Address | Gets or sets the address.
ConnectionTimeout | Gets or sets the request connection timeout.
NetworkCredential | Gets or sets the credentials.
PingEnabled | Gets or sets a value indicating whether it is possible to ping a device.
Port | Gets or sets the port number.
Protocol | Gets or sets the protocol.

Public Instance Methods

ToString Converts the value of this instance to a String representing a devices URL.

See Also

ConnectionInfo Class | DeviceMgr Namespace


ConnectionInfo Constructor

Initializes a new instance of the ConnectionInfo class with the address.

Overload List

Initializes a new instance of the ConnectionInfo class with the protocol, address, port number and credentials.

public ConnectionInfo(Protocol,string,int,NetworkCredential);

Initializes a new instance of the ConnectionInfo class with the address.

public ConnectionInfo(string);

Initializes a new instance of the ConnectionInfo class with the address, user name and password.

public ConnectionInfo(string,string,string);

See Also

ConnectionInfo Class | DeviceMgr Namespace


ConnectionInfo Constructor (String)

Initializes a new instance of the ConnectionInfo class with the address.

[Visual Basic]
Overloads Public Sub New( _
ByVal address As String _
)
[C#]
public ConnectionInfo(
string address
);

Parameters

address
The IP address or hostname of the device.

See Also

ConnectionInfo Class | DeviceMgr Namespace | ConnectionInfo Constructor Overload List


ConnectionInfo Constructor (String, String, String)

Initializes a new instance of the ConnectionInfo class with the address, user name and password.

[Visual Basic]
Overloads Public Sub New( _
ByVal address As String, _
ByVal userName As String, _
ByVal password As String _
)
[C#]
public ConnectionInfo(
string address,
string userName,
string password
);

Parameters

address
The IP address or hostname of the device.
userName
The user name used when accessing the device.
password
The password user when accessing the device.

See Also

ConnectionInfo Class | DeviceMgr Namespace | ConnectionInfo Constructor Overload List


ConnectionInfo Constructor (Protocol, String, Int32, NetworkCredential)

Initializes a new instance of the ConnectionInfo class with the protocol, address, port number and credentials.

[Visual Basic]
Overloads Public Sub New( _
ByVal protocol As Protocol, _
ByVal address As String, _
ByVal port As Integer, _
ByVal networkCredential As NetworkCredential _
)
[C#]
public ConnectionInfo(
Protocol protocol,
string address,
int port,
NetworkCredential networkCredential
);

Parameters

protocol
The Protocol used when accessing the device.
address
The IP address or hostname of the device.
port
The port number used when accessing the device.
networkCredential
The credentials used when accessing the device.

See Also

ConnectionInfo Class | DeviceMgr Namespace | ConnectionInfo Constructor Overload List


ConnectionInfo Properties

The properties of the ConnectionInfo class are listed below. For a complete list of ConnectionInfo class members, see the ConnectionInfo Members topic.

Public Instance Properties

Address | Gets or sets the address.
ConnectionTimeout | Gets or sets the request connection timeout.
NetworkCredential | Gets or sets the credentials.
PingEnabled | Gets or sets a value indicating whether it is possible to ping a device.
Port | Gets or sets the port number.
Protocol | Gets or sets the protocol.

See Also

ConnectionInfo Class | DeviceMgr Namespace


Address Property

AXIS Camera Management SDK 2.00

ConnectionInfo.Address Property

Gets or sets the address.

[Visual Basic]
Public Property Address As String
[C#]
public string Address {get; set;}

Property Value

The address used when accessing a device.

Remarks

The address can be either an IP address or a hostname.

See Also

ConnectionInfo Class | DeviceMgr Namespace


ConnectionTimeout Property

AXIS Camera Management SDK 2.00

ConnectionInfo.ConnectionTimeout Property

Gets or sets the request connection timeout.

[Visual Basic]
Public Property ConnectionTimeout As Integer
[C#]
public int ConnectionTimeout {get; set;}

Property Value

The request connection timeout in milliseconds.

Remarks

The default value is 12000 ms (12 s), The minimum timeout is 12000 ms even if this value is set to a lower value. Setting the value to 0 means no connection timeout.

See Also

ConnectionInfo Class | DeviceMgr Namespace


NetworkCredential Property

AXIS Camera Management SDK 2.00

ConnectionInfo.NetworkCredential Property

Gets or sets the credentials.

[Visual Basic]
Public Property NetworkCredential As NetworkCredential
[C#]
public System.Net.NetworkCredential NetworkCredential {get; set;}

Property Value

The credentials used when accessing a device.

Remarks

The default Axis credentials are:

  • user name: root
  • password: pass

See Also

ConnectionInfo Class | DeviceMgr Namespace


PingEnabled Property

AXIS Camera Management SDK 2.00

ConnectionInfo.PingEnabled Property

Gets or sets a value indicating whether it is possible to ping a device.

[Visual Basic]
Public Property PingEnabled As Boolean
[C#]
public bool PingEnabled {get; set;}

Property Value

true if allowed to ping device; otherwise false.

Remarks

Devices are pinged before function (e.g. upgrade) is started, to make sure the devices exists before trying to access them using HTTP or HTTPS.

To access devices behind proxy or routers blocking ping, set PingEnabled to false, forcing the component to skip ping and start function, using HTTP or HTTPS, directly.

See Also

ConnectionInfo Class | DeviceMgr Namespace


Port Property

AXIS Camera Management SDK 2.00

ConnectionInfo.Port Property

Gets or sets the port number.

[Visual Basic]
Public Property Port As Integer
[C#]
public int Port {get; set;}

Property Value

The port number used when accessing a device.

Remarks

  • Default HTTP port number is 80.
  • Default HTTPS port number is 443.

See Also

ConnectionInfo Class | DeviceMgr Namespace


Protocol Property

AXIS Camera Management SDK 2.00

ConnectionInfo.Protocol Property

Gets or sets the protocol.

[Visual Basic]
Public Property Protocol As Protocol
[C#]
public Protocol Protocol {get; set;}

Property Value

The protocol used when accessing a device.

See Also

ConnectionInfo Class | DeviceMgr Namespace


ConnectionInfo Methods

The methods of the ConnectionInfo class are listed below. For a complete list of ConnectionInfo class members, see the ConnectionInfo Members topic.

Public Instance Methods

ToString Converts the value of this instance to a String representing a devices URL.

See Also

ConnectionInfo Class | DeviceMgr Namespace


ConnectionInfo.ToString Method

Converts the value of this instance to a String representing a devices URL.

[Visual Basic]
Overrides Public Function ToString() As String
[C#]
public override string ToString();

Return Value

A String whose value represents a devices URL, e.g. "http://192.168.0.90" or "https://192.168.0.90:443".

See Also

ConnectionInfo Class | DeviceMgr Namespace


Discover Class

Used when discovering and searching for devices on the network.

For a list of all members of this type, see Discover Members.

System.Object
DeviceMgr.Discover

[Visual Basic]
Public Class Discover
[C#]
public class Discover

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

There are three different ways to actively search the network for Axis devices:

  • BeginSearchLocal will discover all devices on the local network configured to respond to multicast Bonjour and SSDP.
  • BeginSearchRange will discover devices in a given IP range if they are configured to respond to unicast Bonjour.
  • BeginSearchAddress will discover if an specified IP address or hostname is occupied by an Axis device using HTTP or HTTPS.
Start starts a passive discovery of devices, which sends unsolicited notifications. It will discover the same devices as a local search, but without sending requests and thus not as fast.

Example

See discover samples (C#), synchronous discover sample (C++) and asynchronous discover sample (C++) on how to use the Discover methods.

Requirements

Namespace: DeviceMgr

Assembly: DeviceMgr (in DeviceMgr.dll)

See Also

Discover Members | DeviceMgr Namespace | Discover samples (C#) | Synchronous Discover sample (C++) | Asynchronous Discover sample (C++) | The Asynchronous Pattern


Discover Members

Discover overview

Public Static (Shared) Methods

GetDiscoveredDevice | Extracts the discovered device from a Result after searching for a device on a specific address.
Refresh | Refresh discover will send multicast requests triggering all devices to respond immediately.

Public Instance Constructors

Discover Constructor Initializes a new instance of the Discover class.

Public Instance Methods

BeginSearchAddress | Begins an asynchronous request to discover a device at a specified address using HTTP or HTTPS. Should be used when the device is behind NAT or undiscovered by BeginSearchLocal and BeginSearchRange.
BeginSearchLocal | Overloaded. Begins an asynchronous request for discovering devices in the local network using multicast Bonjour and SSDP.
BeginSearchRange | Begins an asynchronous request for discovering devices in a range of IP addresses using unicast Bonjour UDP packet requests, and should be used when multicast SSDP packets are not passing through routers if devices are undiscovered by BeginSearchLocal.
Cancel | Cancels an operation. Does not wait for the cancel to complete. Use End methods for waiting.
EndSearchAddress | Overloaded. Waits for BeginSearchAddress to end and returns the discovered device.
EndSearchLocal | Waits for BeginSearchLocal to end and returns the discovered devices.
EndSearchRange | Waits for BeginSearchRange to end and returns the discovered devices.
Start | Starts passive discovery of devices, which sends unsolicited notifications. It will discover the same devices as with BeginSearchLocal, but without sending requests and thus not as fast.
Stop | Stops passive discovery of devices started with the Start method.

Public Instance Events

DiscoverUpdate | Occurs when a device has been discovered or updated, i.e., a device has sent a notification. The event contains information about the discovered device.
ProgressUpdate | Progress event during a BeginSearchAddress, BeginSearchRange and BeginSearchLocal requests.

See Also

Discover Class | DeviceMgr Namespace | Discover samples (C#) | Synchronous Discover sample (C++) | Asynchronous Discover sample (C++) | The Asynchronous Pattern


Discover Constructor

Initializes a new instance of the Discover class.

[Visual Basic]
Public Sub New()
[C#]
public Discover();

Example

See discover samples (C#), synchronous discover sample (C++) and asynchronous discover sample (C++) on how to use the Discover methods.

See Also

Discover Class | DeviceMgr Namespace | Discover samples (C#) | Synchronous Discover sample (C++) | Asynchronous Discover sample (C++)


Discover Methods

The methods of the Discover class are listed below. For a complete list of Discover class members, see the Discover Members topic.

Public Static (Shared) Methods

GetDiscoveredDevice | Extracts the discovered device from a Result after searching for a device on a specific address.
Refresh | Refresh discover will send multicast requests triggering all devices to respond immediately.

Public Instance Methods

BeginSearchAddress | Begins an asynchronous request to discover a device at a specified address using HTTP or HTTPS. Should be used when the device is behind NAT or undiscovered by BeginSearchLocal and BeginSearchRange.
BeginSearchLocal | Overloaded. Begins an asynchronous request for discovering devices in the local network using multicast Bonjour and SSDP.
BeginSearchRange | Begins an asynchronous request for discovering devices in a range of IP addresses using unicast Bonjour UDP packet requests, and should be used when multicast SSDP packets are not passing through routers if devices are undiscovered by BeginSearchLocal.
Cancel | Cancels an operation. Does not wait for the cancel to complete. Use End methods for waiting.
EndSearchAddress | Overloaded. Waits for BeginSearchAddress to end and returns the discovered device.
EndSearchLocal | Waits for BeginSearchLocal to end and returns the discovered devices.
EndSearchRange | Waits for BeginSearchRange to end and returns the discovered devices.
Start | Starts passive discovery of devices, which sends unsolicited notifications. It will discover the same devices as with BeginSearchLocal, but without sending requests and thus not as fast.
Stop | Stops passive discovery of devices started with the Start method.

See Also

Discover Class | DeviceMgr Namespace | Discover samples (C#) | Synchronous Discover sample (C++) | Asynchronous Discover sample (C++) | The Asynchronous Pattern


Discover.BeginSearchAddress Method

Begins an asynchronous request to discover a device at a specified address using HTTP or HTTPS. Should be used when the device is behind NAT or undiscovered by BeginSearchLocal and BeginSearchRange.

[Visual Basic]
Public Function BeginSearchAddress( _
ByVal connectionInfo As ConnectionInfo, _
ByVal callback As AsyncCallback, _
ByVal state As Object _
) As IAsyncResult
[C#]
public IAsyncResult BeginSearchAddress(
ConnectionInfo connectionInfo,
AsyncCallback callback,
object state
);

Parameters

connectionInfo
The connection info used when accessing the device.
callback
The AsyncCallback delegate.
state
A user provided object that is passed to the method invoked when the asynchronous operation completes or in the result and can e.g. contain user state information.

Return Value

An IAsyncResult that references the asynchronous request.

Remarks

The BeginSearchAddress method starts an asynchronous request for discovering a device at a specified address. The callback method that implements the AsyncCallback delegate uses the EndSearchAddress method to return the discovered device. When a device is discovered, the DiscoverUpdate is triggered, which contains information regarding the device.

Example

See discover sample (C#), synchronous discover sample (C++) and asynchronous discover sample (C++) on how to search an address using the Discover methods.

See Also

Discover Class | DeviceMgr Namespace | Discover address sample (C#) | Synchronous Discover sample (C++) | Asynchronous Discover sample (C++) | The Asynchronous Pattern


BeginSearchLocal Method

AXIS Camera Management SDK 2.00

Discover.BeginSearchLocal Method

Begins an asynchronous request for discovering devices in the local network using multicast Bonjour and SSDP.

Overload List

Begins an asynchronous request for discovering devices in the local network using multicast Bonjour and SSDP.

public IAsyncResult BeginSearchLocal(AsyncCallback,object);

Begins an asynchronous request for discovering devices in the local network using multicast Bonjour and SSDP. The option to set a time-span controls the amount of time the search will endure.

public IAsyncResult BeginSearchLocal(int,AsyncCallback,object);

See Also

Discover Class | DeviceMgr Namespace | Discover on local network sample (C#) | Synchronous Discover sample (C++) | Asynchronous Discover sample (C++) | The Asynchronous Pattern


Discover.BeginSearchLocal Method (AsyncCallback, Object)

Begins an asynchronous request for discovering devices in the local network using multicast Bonjour and SSDP.

[Visual Basic]
Overloads Public Function BeginSearchLocal( _
ByVal callback As AsyncCallback, _
ByVal state As Object _
) As IAsyncResult
[C#]
public IAsyncResult BeginSearchLocal(
AsyncCallback callback,
object state
);

Parameters

callback
The AsyncCallback delegate.
state
A user provided object that is passed to the method invoked when the asynchronous operation completes or in the result and can e.g. contain user state information.

Return Value

An IAsyncResult that references the asynchronous request.

Remarks

The BeginSearchLocal method starts an asynchronous request for discovering devices in the local network. The callback method that implements the AsyncCallback delegate uses the EndSearchLocal method to return the discovered devices. The search endures for 10 seconds, which means that devices responding after this time-span won't be discovered. To set a custom time-span, use BeginSearchLocal. When a device is discovered, the DiscoverUpdate is triggered, which contains information regarding the device.

Example

See discover sample (C#), synchronous discover sample (C++) and asynchronous discover sample (C++) on how to search the local network using the Discover methods.

See Also

Discover Class | DeviceMgr Namespace | Discover.BeginSearchLocal Overload List | Discover on local network sample (C#) | Synchronous Discover sample (C++) | Asynchronous Discover sample (C++) | The Asynchronous Pattern


Discover.BeginSearchLocal Method (Int32, AsyncCallback, Object)

Begins an asynchronous request for discovering devices in the local network using multicast Bonjour and SSDP. The option to set a time-span controls the amount of time the search will endure.

[Visual Basic]
Overloads Public Function BeginSearchLocal( _
ByVal timeout As Integer, _
ByVal callback As AsyncCallback, _
ByVal state As Object _
) As IAsyncResult
[C#]
public IAsyncResult BeginSearchLocal(
int timeout,
AsyncCallback callback,
object state
);

Parameters

timeout
The search timeout. Devices responding to the search after the timeout are not discovered.
callback
The AsyncCallback delegate.
state
A user provided object that is passed to the method invoked when the asynchronous operation completes or in the result and can e.g. contain user state information.

Remarks

The BeginSearchLocal method starts an asynchronous request for discovering devices. The callback method that implements the AsyncCallback delegate uses the EndSearchLocal method to return the discovered devices. When a device is discovered, the DiscoverUpdate is triggered, which contains information regarding the device.

Example

See discover sample (C#), synchronous discover sample (C++) and asynchronous discover sample (C++) on how to search the local network using the Discover methods.

See Also

Discover Class | DeviceMgr Namespace | Discover.BeginSearchLocal Overload List | Discover on local network sample (C#) | Synchronous Discover sample (C++) | Asynchronous Discover sample (C++) | The Asynchronous Pattern


Discover.BeginSearchRange Method

Begins an asynchronous request for discovering devices in a range of IP addresses using unicast Bonjour UDP packet requests, and should be used when multicast SSDP packets are not passing through routers if devices are undiscovered by BeginSearchLocal.

[Visual Basic]
Public Function BeginSearchRange( _
ByVal firstAddress As String, _
ByVal lastAddress As String, _
ByVal packetPerSecond As Integer, _
ByVal callback As AsyncCallback, _
ByVal state As Object _
) As IAsyncResult
[C#]
public IAsyncResult BeginSearchRange(
string firstAddress,
string lastAddress,
int packetPerSecond,
AsyncCallback callback,
object state
);

Parameters

firstAddress
The first IP address in the IP range.
lastAddress
The last IP address in the IP range.
packetPerSecond
The number of transmitted packets per second. 1000 packets/second is a reasonable value.
callback
The AsyncCallback delegate.
state
A user provided object that is passed to the method invoked when the asynchronous operation completes or in the result and can e.g. contain user state information.

Return Value

An IAsyncResult that references the asynchronous request.

Remarks

The BeginSearchRange method starts an asynchronous request for discovering devices in a range of IP addresses. The callback method that implements the AsyncCallback delegate uses the EndSearchRange method to return the discovered devices. When a device is discovered, the DiscoverUpdate is triggered, which contains information regarding the device.

Example

See discover sample (C#), synchronous discover sample (C++) and asynchronous discover sample (C++) on how to search a specified IP range using the Discover methods.

See Also

Discover Class | DeviceMgr Namespace | Discover IP range sample (C#) | Synchronous Discover sample (C++) | Asynchronous Discover sample (C++) | The Asynchronous Pattern


Discover.Cancel Method

Cancels an operation. Does not wait for the cancel to complete. Use End methods for waiting.

[Visual Basic]
Public Sub Cancel( _
ByVal ar As IAsyncResult _
)
[C#]
public void Cancel(
IAsyncResult ar
);

Parameters

ar
The IAsyncResult handle returned by the corresponding Begin method.

Remarks

A Cancel call will not block and wait for the request to be canceled. Use asyncResult.AsyncWaitHandle.WaitOne(); or corresponding End method to wait for the request to be canceled or completed.

The returned values in the case of a subsequent corresponding End method depends on the timing of the Cancel call.

Note Canceling an ongoing request may produce an undefined result. For example, depending on the timing of the Cancel call, the request may have finished before the call could cancel it. Or in the case of an upgrade request, the firmware file may have been sent to the device, which will continue the upgrade even if the connection is disconnected by a cancel.

Example

See discover samples (C#), synchronous discover sample (C++) and asynchronous discover sample (C++) on how to use the Discover methods.

See Also

Discover Class | DeviceMgr Namespace | Discover samples (C#) | Synchronous Discover sample (C++) | Asynchronous Discover sample (C++) | The Asynchronous Pattern


EndSearchAddress Method

AXIS Camera Management SDK 2.00

Discover.EndSearchAddress Method

Waits for BeginSearchAddress to end and returns the discovered device.

Overload List

Waits for BeginSearchAddress to end and returns the discovered device.

public DiscoveredDevice EndSearchAddress(IAsyncResult);

Waits for BeginSearchAddress to end and returns the discovered device and the Result.

public DiscoveredDevice EndSearchAddress(IAsyncResult,out Result);

See Also

Discover Class | DeviceMgr Namespace | Discover address sample (C#) | Synchronous Discover sample (C++) | Asynchronous Discover sample (C++) | The Asynchronous Pattern


Discover.EndSearchAddress Method (IAsyncResult)

Waits for BeginSearchAddress to end and returns the discovered device.

[Visual Basic]
Overloads Public Function EndSearchAddress( _
ByVal ar As IAsyncResult _
) As DiscoveredDevice
[C#]
public DiscoveredDevice EndSearchAddress(
IAsyncResult ar
);

Parameters

ar
The IAsyncResult handle returned by the corresponding Begin method.

Return Value

The discovered device if Discover was successful; otherwise null.

Example

See discover sample (C#), synchronous discover sample (C++) and asynchronous discover sample (C++) on how to search an address using the Discover methods.

See Also

Discover Class | DeviceMgr Namespace | Discover.EndSearchAddress Overload List | Discover address sample (C#) | Synchronous Discover sample (C++) | Asynchronous Discover sample (C++) | The Asynchronous Pattern


Discover.EndSearchAddress Method (IAsyncResult, Result)

Waits for BeginSearchAddress to end and returns the discovered device and the Result.

[Visual Basic]
Overloads Public Function EndSearchAddress( _
ByVal ar As IAsyncResult, _
ByRef result As Result _
) As DiscoveredDevice
[C#]
public DiscoveredDevice EndSearchAddress(
IAsyncResult ar,
out Result result
);

Parameters

ar
The IAsyncResult handle returned by the corresponding Begin method.
result
The Result describing the function status.

Return Value

The discovered device if Discover was successful; otherwise null.

Example

See discover sample (C#), synchronous discover sample (C++) and asynchronous discover sample (C++) on how to search an address using the Discover methods.

See Also

Discover Class | DeviceMgr Namespace | Discover.EndSearchAddress Overload List | Discover address sample (C#) | Synchronous Discover sample (C++) | Asynchronous Discover sample (C++) | The Asynchronous Pattern


Discover.EndSearchLocal Method

Waits for BeginSearchLocal to end and returns the discovered devices.

[Visual Basic]
Public Function EndSearchLocal( _
ByVal ar As IAsyncResult _
) As DiscoveredDeviceList
[C#]
public DiscoveredDeviceList EndSearchLocal(
IAsyncResult ar
);

Parameters

ar
The IAsyncResult handle returned by the corresponding Begin method.

Return Value

The discovered devices. The list may be empty if no devices where found.

Example

See discover sample (C#), synchronous discover sample (C++) and asynchronous discover sample (C++) on how to search the local network using the Discover methods.

See Also

Discover Class | DeviceMgr Namespace | Discover on local network sample (C#) | Synchronous Discover sample (C++) | Asynchronous Discover sample (C++) | The Asynchronous Pattern


Discover.EndSearchRange Method

Waits for BeginSearchRange to end and returns the discovered devices.

[Visual Basic]
Public Function EndSearchRange( _
ByVal ar As IAsyncResult _
) As DiscoveredDeviceList
[C#]
public DiscoveredDeviceList EndSearchRange(
IAsyncResult ar
);

Parameters

ar
The IAsyncResult handle returned by the corresponding Begin method.

Return Value

The discovered devices. The list may be empty if no devices where found.

Example

See discover sample (C#), synchronous discover sample (C++) and asynchronous discover sample (C++) on how to search a specified IP range using the Discover methods.

See Also

Discover Class | DeviceMgr Namespace | Discover IP range sample (C#) | Synchronous Discover sample (C++) | Asynchronous Discover sample (C++) | The Asynchronous Pattern


Discover.GetDiscoveredDevice Method

Extracts the discovered device from a Result after searching for a device on a specific address.

[Visual Basic]
Public Shared Function GetDiscoveredDevice( _
ByVal result As Result _
) As DiscoveredDevice
[C#]
public static DiscoveredDevice GetDiscoveredDevice(
Result result
);

Parameters

result
The Result describing the function status.

Return Value

The discovered device if Discover was successful; otherwise null.

Example

See discover samples (C#), synchronous discover sample (C++) and asynchronous discover sample (C++) on how to use the Discover methods.

See Also

Discover Class | DeviceMgr Namespace | Discover samples (C#) | Synchronous Discover sample (C++) | Asynchronous Discover sample (C++)


Discover.Refresh Method

Refresh discover will send multicast requests triggering all devices to respond immediately.

[Visual Basic]
Public Shared Sub Refresh()
[C#]
public static void Refresh();

Remarks

Refresh is intended to be used together with the Start to refresh background discovery.

Example

See discover samples (C#), synchronous discover sample (C++) and asynchronous discover sample (C++) on how to use the Discover methods.

See Also

Discover Class | DeviceMgr Namespace | Discover samples (C#) | Synchronous Discover sample (C++) | Asynchronous Discover sample (C++)


Discover.Start Method

Starts passive discovery of devices, which sends unsolicited notifications. It will discover the same devices as with BeginSearchLocal, but without sending requests and thus not as fast.

[Visual Basic]
Public Sub Start( _
ByVal state As Object _
)
[C#]
public void Start(
object state
);

Parameters

state
A user provided object that is passed to the method invoked when the asynchronous operation completes or in the result and can e.g. contain user state information.

Example

See discover samples (C#), synchronous discover sample (C++) and asynchronous discover sample (C++) on how to use the Discover methods.

See Also

Discover Class | DeviceMgr Namespace | Discover samples (C#) | Synchronous Discover sample (C++) | Asynchronous Discover sample (C++)


Discover.Stop Method

Stops passive discovery of devices started with the Start method.

[Visual Basic]
Public Sub Stop()
[C#]
public void Stop();

Example

See discover samples (C#), synchronous discover sample (C++) and asynchronous discover sample (C++) on how to use the Discover methods.

See Also

Discover Class | DeviceMgr Namespace | Discover samples (C#) | Synchronous Discover sample (C++) | Asynchronous Discover sample (C++)


Discover Events

The events of the Discover class are listed below. For a complete list of Discover class members, see the Discover Members topic.

Public Instance Events

DiscoverUpdate | Occurs when a device has been discovered or updated, i.e., a device has sent a notification. The event contains information about the discovered device.
ProgressUpdate | Progress event during a BeginSearchAddress, BeginSearchRange and BeginSearchLocal requests.

See Also

Discover Class | DeviceMgr Namespace | Discover samples (C#) | Synchronous Discover sample (C++) | Asynchronous Discover sample (C++) | The Asynchronous Pattern


Discover.DiscoverUpdate Event

Occurs when a device has been discovered or updated, i.e., a device has sent a notification. The event contains information about the discovered device.

[Visual Basic]
Public Event DiscoverUpdate As DiscoveryEventHandler
[C#]
public event DiscoveryEventHandler DiscoverUpdate;

Event Data

The event handler receives an argument of type DiscoverEventArgs containing data related to this event. The following DiscoverEventArgs properties provide information specific to this event.

Property | Description
AsyncState | Gets an object containing information about the DiscoverEventArgs.
DiscoveredDevice | Gets the discovered device.

Example

See discover samples (C#), synchronous discover sample (C++) and asynchronous discover sample (C++) on how to use the Discover methods.

See Also

Discover Class | DeviceMgr Namespace | Discover samples (C#) | Synchronous Discover sample (C++) | Asynchronous Discover sample (C++)


Discover.ProgressUpdate Event

Progress event during a BeginSearchAddress, BeginSearchRange and BeginSearchLocal requests.

[Visual Basic]
Public Event ProgressUpdate As ProgressEventHandler
[C#]
public event ProgressEventHandler ProgressUpdate;

Event Data

The event handler receives an argument of type ProgressEventArgs containing data related to this event. The following ProgressEventArgs properties provide information specific to this event.

Property | Description
AsyncState | Gets an object containing information about the ProgressEventArgs.
Progress | Gets the progress percent.

Example

See discover samples (C#), synchronous discover sample (C++) and asynchronous discover sample (C++) on how to use the Discover methods.

See Also

Discover Class | DeviceMgr Namespace | Discover samples (C#) | Synchronous Discover sample (C++) | Asynchronous Discover sample (C++)


DiscoveredDevice Class

Containing parameters and values received from device discovered with Discover

For a list of all members of this type, see DiscoveredDevice Members.

System.Object
DeviceMgr.DiscoveredDevice

[Visual Basic]
Public Class DiscoveredDevice
[C#]
public class DiscoveredDevice

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

Discovered devices are reported during searches by the DiscoverUpdate event or returned after the search finishes and the asynchronous End method is called. A DiscoveredDevice specifies a devices brand, model, serial number, name, HTTP port number, HTTPS port number, DNS name, IP address, whether the address is invalid and the link local (also known as AutoIP) address.

Example

See discover samples (C#), synchronous discover sample (C++) and asynchronous discover sample (C++) on how to use the Discover methods.

Requirements

Namespace: DeviceMgr

Assembly: DeviceMgr (in DeviceMgr.dll)

See Also

DiscoveredDevice Members | DeviceMgr Namespace | Discover | Discover samples (C#) | Synchronous Discover sample (C++) | Asynchronous Discover sample (C++)


DiscoveredDevice Members

DiscoveredDevice overview

Public Static (Shared) Fields

No | A String, indicating that the IP address is valid, used by InvalidIPAddress.
Yes | A String, indicating that the IP address is invalid, used by InvalidIPAddress.

Public Instance Properties

Brand | Gets the product brand.
DnsName | Gets the DNS name.
HttpsPort | Gets the HTTPS port number.
InvalidIPAddress | Gets a value indicating whether the IP address is invalid.
IPAddress | Gets the physical IP address of a device on the network.
LinklocalAddress | Gets the link local address (also known as AutoIP).
ModelName | Gets the model.
Name | Gets the name.
Port | Gets the HTTP port number.
SerialNumber | Gets the serial number.

Public Instance Methods

ToString Converts the value of this instance to a String containing data about the discovered device.

See Also

DiscoveredDevice Class | DeviceMgr Namespace | Discover | Discover samples (C#) | Synchronous Discover sample (C++) | Asynchronous Discover sample (C++)


DiscoveredDevice Fields

The fields of the DiscoveredDevice class are listed below. For a complete list of DiscoveredDevice class members, see the DiscoveredDevice Members topic.

Public Static (Shared) Fields

No | A String, indicating that the IP address is valid, used by InvalidIPAddress.
Yes | A String, indicating that the IP address is invalid, used by InvalidIPAddress.

See Also

DiscoveredDevice Class | DeviceMgr Namespace | Discover | Discover samples (C#) | Synchronous Discover sample (C++) | Asynchronous Discover sample (C++)


DiscoveredDevice.No Field

A String, indicating that the IP address is valid, used by InvalidIPAddress.

[Visual Basic]
Public Const No As String = "no"
[C#]
public const string No = "no";

Example

See discover samples (C#), synchronous discover sample (C++) and asynchronous discover sample (C++) on how to use the Discover methods.

See Also

DiscoveredDevice Class | DeviceMgr Namespace | Discover | Discover samples (C#) | Synchronous Discover sample (C++) | Asynchronous Discover sample (C++)


DiscoveredDevice.Yes Field

A String, indicating that the IP address is invalid, used by InvalidIPAddress.

[Visual Basic]
Public Const Yes As String = "yes"
[C#]
public const string Yes = "yes";

Example

See discover samples (C#), synchronous discover sample (C++) and asynchronous discover sample (C++) on how to use the Discover methods.

See Also

DiscoveredDevice Class | DeviceMgr Namespace | Discover | Discover samples (C#) | Synchronous Discover sample (C++) | Asynchronous Discover sample (C++)


DiscoveredDevice Properties

The properties of the DiscoveredDevice class are listed below. For a complete list of DiscoveredDevice class members, see the DiscoveredDevice Members topic.

Public Instance Properties

Brand | Gets the product brand.
DnsName | Gets the DNS name.
HttpsPort | Gets the HTTPS port number.
InvalidIPAddress | Gets a value indicating whether the IP address is invalid.
IPAddress | Gets the physical IP address of a device on the network.
LinklocalAddress | Gets the link local address (also known as AutoIP).
ModelName | Gets the model.
Name | Gets the name.
Port | Gets the HTTP port number.
SerialNumber | Gets the serial number.

See Also

DiscoveredDevice Class | DeviceMgr Namespace | Discover | Discover samples (C#) | Synchronous Discover sample (C++) | Asynchronous Discover sample (C++)


Brand Property

AXIS Camera Management SDK 2.00

DiscoveredDevice.Brand Property

Gets the product brand.

[Visual Basic]
Public ReadOnly Property Brand As String
[C#]
public string Brand {get;}

Property Value

The brand of the device, i.e. AXIS.

Example

See discover samples (C#), synchronous discover sample (C++) and asynchronous discover sample (C++) on how to use the Discover methods.

See Also

DiscoveredDevice Class | DeviceMgr Namespace | Discover | Discover samples (C#) | Synchronous Discover sample (C++) | Asynchronous Discover sample (C++)


DnsName Property

AXIS Camera Management SDK 2.00

DiscoveredDevice.DnsName Property

Gets the DNS name.

[Visual Basic]
Public ReadOnly Property DnsName As String
[C#]
public string DnsName {get;}

Property Value

The DNS name of the device.

Example

See discover samples (C#), synchronous discover sample (C++) and asynchronous discover sample (C++) on how to use the Discover methods.

See Also

DiscoveredDevice Class | DeviceMgr Namespace | Discover | Discover samples (C#) | Synchronous Discover sample (C++) | Asynchronous Discover sample (C++)


HttpsPort Property

AXIS Camera Management SDK 2.00

DiscoveredDevice.HttpsPort Property

Gets the HTTPS port number.

[Visual Basic]
Public ReadOnly Property HttpsPort As Integer
[C#]
public int HttpsPort {get;}

Property Value

The HTTPS port number of the device.

Remarks

The default HTTPS port number is 443.

Example

See discover samples (C#), synchronous discover sample (C++) and asynchronous discover sample (C++) on how to use the Discover methods.

See Also

DiscoveredDevice Class | DeviceMgr Namespace | Discover | Discover samples (C#) | Synchronous Discover sample (C++) | Asynchronous Discover sample (C++)


InvalidIPAddress Property

AXIS Camera Management SDK 2.00

DiscoveredDevice.InvalidIPAddress Property

Gets a value indicating whether the IP address is invalid.

[Visual Basic]
Public ReadOnly Property InvalidIPAddress As String
[C#]
public string InvalidIPAddress {get;}

Property Value

No if the IP address is valid; Yes if it is invalid; null if uncertain.

Example

See discover samples (C#), synchronous discover sample (C++) and asynchronous discover sample (C++) on how to use the Discover methods.

See Also

DiscoveredDevice Class | DeviceMgr Namespace | Discover | Discover samples (C#) | Synchronous Discover sample (C++) | Asynchronous Discover sample (C++)


IPAddress Property

AXIS Camera Management SDK 2.00

DiscoveredDevice.IPAddress Property

Gets the physical IP address of a device on the network.

[Visual Basic]
Public ReadOnly Property IPAddress As String
[C#]
public string IPAddress {get;}

Property Value

The physical IP address of the device.

Example

See discover samples (C#), synchronous discover sample (C++) and asynchronous discover sample (C++) on how to use the Discover methods.

See Also

DiscoveredDevice Class | DeviceMgr Namespace | Discover | Discover samples (C#) | Synchronous Discover sample (C++) | Asynchronous Discover sample (C++)


LinklocalAddress Property

AXIS Camera Management SDK 2.00

DiscoveredDevice.LinklocalAddress Property

Gets the link local address (also known as AutoIP).

[Visual Basic]
Public ReadOnly Property LinklocalAddress As String
[C#]
public string LinklocalAddress {get;}

Property Value

The link local address of the device (in range 169.254.*).

Example

See discover samples (C#), synchronous discover sample (C++) and asynchronous discover sample (C++) on how to use the Discover methods.

See Also

DiscoveredDevice Class | DeviceMgr Namespace | Discover | Discover samples (C#) | Synchronous Discover sample (C++) | Asynchronous Discover sample (C++)


ModelName Property

AXIS Camera Management SDK 2.00

DiscoveredDevice.ModelName Property

Gets the model.

[Visual Basic]
Public ReadOnly Property ModelName As String
[C#]
public string ModelName {get;}

Property Value

The model of the device.

Example

See discover samples (C#), synchronous discover sample (C++) and asynchronous discover sample (C++) on how to use the Discover methods.

See Also

DiscoveredDevice Class | DeviceMgr Namespace | Discover | Discover samples (C#) | Synchronous Discover sample (C++) | Asynchronous Discover sample (C++)


Name Property

AXIS Camera Management SDK 2.00

DiscoveredDevice.Name Property

Gets the name.

[Visual Basic]
Public ReadOnly Property Name As String
[C#]
public string Name {get;}

Property Value

The name of the device (default model-serial number).

Example

See discover samples (C#), synchronous discover sample (C++) and asynchronous discover sample (C++) on how to use the Discover methods.

See Also

DiscoveredDevice Class | DeviceMgr Namespace | Discover | Discover samples (C#) | Synchronous Discover sample (C++) | Asynchronous Discover sample (C++)


Port Property

AXIS Camera Management SDK 2.00

DiscoveredDevice.Port Property

Gets the HTTP port number.

[Visual Basic]
Public ReadOnly Property Port As Integer
[C#]
public int Port {get;}

Property Value

The port number used by the device.

Remarks

The default HTTP port number is 80.

Example

See discover samples (C#), synchronous discover sample (C++) and asynchronous discover sample (C++) on how to use the Discover methods.

See Also

DiscoveredDevice Class | DeviceMgr Namespace | Discover | Discover samples (C#) | Synchronous Discover sample (C++) | Asynchronous Discover sample (C++)


SerialNumber Property

AXIS Camera Management SDK 2.00

DiscoveredDevice.SerialNumber Property

Gets the serial number.

[Visual Basic]
Public ReadOnly Property SerialNumber As String
[C#]
public string SerialNumber {get;}

Property Value

The serial number of the discovered device.

Remarks

The serial number usually is the same as the device MAC address, however this may not always be the case in all situations.

Example

See discover samples (C#), synchronous discover sample (C++) and asynchronous discover sample (C++) on how to use the Discover methods.

See Also

DiscoveredDevice Class | DeviceMgr Namespace | Discover | Discover samples (C#) | Synchronous Discover sample (C++) | Asynchronous Discover sample (C++)


DiscoveredDevice Methods

The methods of the DiscoveredDevice class are listed below. For a complete list of DiscoveredDevice class members, see the DiscoveredDevice Members topic.

Public Instance Methods

ToString Converts the value of this instance to a String containing data about the discovered device.

See Also

DiscoveredDevice Class | DeviceMgr Namespace | Discover | Discover samples (C#) | Synchronous Discover sample (C++) | Asynchronous Discover sample (C++)


DiscoveredDevice.ToString Method

Converts the value of this instance to a String containing data about the discovered device.

[Visual Basic]
Overrides Public Function ToString() As String
[C#]
public override string ToString();

Return Value

A String whose value represents the discovered device.

Example

See discover samples (C#), synchronous discover sample (C++) and asynchronous discover sample (C++) on how to use the Discover methods.

See Also

DiscoveredDevice Class | DeviceMgr Namespace | Discover | Discover samples (C#) | Synchronous Discover sample (C++) | Asynchronous Discover sample (C++)


DiscoveredDeviceList Class

A list of DiscoveredDevice objects.

For a list of all members of this type, see DiscoveredDeviceList Members.

System.Object
System.Collections.DictionaryBase
DeviceMgr.DiscoveredDeviceList

[Visual Basic]
Public Class DiscoveredDeviceList
Inherits DictionaryBase
[C#]
public class DiscoveredDeviceList : DictionaryBase

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Example

See discover samples (C#), synchronous discover sample (C++) and asynchronous discover sample (C++) on how to use the Discover methods.

Requirements

Namespace: DeviceMgr

Assembly: DeviceMgr (in DeviceMgr.dll)

See Also

DiscoveredDeviceList Members | DeviceMgr Namespace | DiscoveredDevice | Discover | Discover samples (C#) | Synchronous Discover sample (C++) | Asynchronous Discover sample (C++)


DiscoveredDeviceList Members

DiscoveredDeviceList overview

Public Instance Constructors

DiscoveredDeviceList Constructor Initializes a new instance of the DiscoveredDeviceList class.

Public Instance Properties

Item | Gets or sets the DiscoveredDevice with a specified serial number in the list.
Values | Gets a collection containing the discovered devices in the DiscoveredDeviceList.

Public Instance Methods

Add | Adds the specified discovered device to the DiscoveredDeviceList.
ContainsKey | Determines whether the DiscoveredDeviceList contains a device with the specified serial number.

See Also

DiscoveredDeviceList Class | DeviceMgr Namespace | DiscoveredDevice | Discover | Discover samples (C#) | Synchronous Discover sample (C++) | Asynchronous Discover sample (C++)


DiscoveredDeviceList Constructor

Initializes a new instance of the DiscoveredDeviceList class.

[Visual Basic]
Overloads Public Sub New()
[C#]
public DiscoveredDeviceList();

Example

See discover samples (C#), synchronous discover sample (C++) and asynchronous discover sample (C++) on how to use the Discover methods.

See Also

DiscoveredDeviceList Class | DeviceMgr Namespace | DiscoveredDevice | Discover | Discover samples (C#) | Synchronous Discover sample (C++) | Asynchronous Discover sample (C++)


DiscoveredDeviceList Properties

The properties of the DiscoveredDeviceList class are listed below. For a complete list of DiscoveredDeviceList class members, see the DiscoveredDeviceList Members topic.

Public Instance Properties

Item | Gets or sets the DiscoveredDevice with a specified serial number in the list.
Values | Gets a collection containing the discovered devices in the DiscoveredDeviceList.

See Also

DiscoveredDeviceList Class | DeviceMgr Namespace | DiscoveredDevice | Discover | Discover samples (C#) | Synchronous Discover sample (C++) | Asynchronous Discover sample (C++)


Item Property

AXIS Camera Management SDK 2.00

DiscoveredDeviceList.Item Property

Gets or sets the DiscoveredDevice with a specified serial number in the list.

[Visual Basic]
Public Default Property Item( _
ByVal serialNumber As String _
) As DiscoveredDevice
[C#]
public DiscoveredDevice this[
string serialNumber
] {get; set;}

Parameters

serialNumber
The serial number of the DiscoveredDevice in the list.

Example

See discover samples (C#), synchronous discover sample (C++) and asynchronous discover sample (C++) on how to use the Discover methods.

See Also

DiscoveredDeviceList Class | DeviceMgr Namespace | DiscoveredDevice | Discover | Discover samples (C#) | Synchronous Discover sample (C++) | Asynchronous Discover sample (C++)


Values Property

AXIS Camera Management SDK 2.00

DiscoveredDeviceList.Values Property

Gets a collection containing the discovered devices in the DiscoveredDeviceList.

[Visual Basic]
Public ReadOnly Property Values As ICollection
[C#]
public System.Collections.ICollection Values {get;}

Property Value

A collection of discovered devices.

Example

See discover samples (C#), synchronous discover sample (C++) and asynchronous discover sample (C++) on how to use the Discover methods.

See Also

DiscoveredDeviceList Class | DeviceMgr Namespace | DiscoveredDevice | Discover | Discover samples (C#) | Synchronous Discover sample (C++) | Asynchronous Discover sample (C++)


DiscoveredDeviceList Methods

The methods of the DiscoveredDeviceList class are listed below. For a complete list of DiscoveredDeviceList class members, see the DiscoveredDeviceList Members topic.

Public Instance Methods

Add | Adds the specified discovered device to the DiscoveredDeviceList.
ContainsKey | Determines whether the DiscoveredDeviceList contains a device with the specified serial number.

See Also

DiscoveredDeviceList Class | DeviceMgr Namespace | DiscoveredDevice | Discover | Discover samples (C#) | Synchronous Discover sample (C++) | Asynchronous Discover sample (C++)


DiscoveredDeviceList.Add Method

Adds the specified discovered device to the DiscoveredDeviceList.

[Visual Basic]
Public Sub Add( _
ByVal discoveredDevice As DiscoveredDevice _
)
[C#]
public void Add(
DiscoveredDevice discoveredDevice
);

Parameters

discoveredDevice
The DiscoveredDevice to be added to the end of the DiscoveredDeviceList.

Example

See discover samples (C#), synchronous discover sample (C++) and asynchronous discover sample (C++) on how to use the Discover methods.

See Also

DiscoveredDeviceList Class | DeviceMgr Namespace | DiscoveredDevice | Discover | Discover samples (C#) | Synchronous Discover sample (C++) | Asynchronous Discover sample (C++)


DiscoveredDeviceList.ContainsKey Method

Determines whether the DiscoveredDeviceList contains a device with the specified serial number.

[Visual Basic]
Public Function ContainsKey( _
ByVal serialNumber As String _
) As Boolean
[C#]
public bool ContainsKey(
string serialNumber
);

Parameters

serialNumber
The serial number to locate in the DiscoveredDeviceList.

Return Value

true if the DiscoveredDeviceList contains a DiscoveredDevice with the specified serial number; otherwise false.

Example

See discover samples (C#), synchronous discover sample (C++) and asynchronous discover sample (C++) on how to use the Discover methods.

See Also

DiscoveredDeviceList Class | DeviceMgr Namespace | DiscoveredDevice | Discover | Discover samples (C#) | Synchronous Discover sample (C++) | Asynchronous Discover sample (C++)


DiscoverEventArgs Class

Provides data for the DiscoverUpdate event.

For a list of all members of this type, see DiscoverEventArgs Members.

System.Object
System.EventArgs
DeviceMgr.DiscoverEventArgs

[Visual Basic]
Public Class DiscoverEventArgs
Inherits EventArgs
[C#]
public class DiscoverEventArgs : EventArgs

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

The DiscoverUpdate event occurs each time a device is discovered during search address, search range and search local. A DiscoverEventArgs specifies the discovered device, and a state object describing it further.

Example

See discover samples (C#), synchronous discover sample (C++) and asynchronous discover sample (C++) on how to use the Discover methods.

Requirements

Namespace: DeviceMgr

Assembly: DeviceMgr (in DeviceMgr.dll)

See Also

DiscoverEventArgs Members | DeviceMgr Namespace | Discover | Discover samples (C#) | Synchronous Discover sample (C++) | Asynchronous Discover sample (C++)


DiscoverEventArgs Members

DiscoverEventArgs overview

Public Instance Properties

AsyncState | Gets an object containing information about the DiscoverEventArgs.
DiscoveredDevice | Gets the discovered device.

See Also

DiscoverEventArgs Class | DeviceMgr Namespace | Discover | Discover samples (C#) | Synchronous Discover sample (C++) | Asynchronous Discover sample (C++)


DiscoverEventArgs Properties

The properties of the DiscoverEventArgs class are listed below. For a complete list of DiscoverEventArgs class members, see the DiscoverEventArgs Members topic.

Public Instance Properties

AsyncState | Gets an object containing information about the DiscoverEventArgs.
DiscoveredDevice | Gets the discovered device.

See Also

DiscoverEventArgs Class | DeviceMgr Namespace | Discover | Discover samples (C#) | Synchronous Discover sample (C++) | Asynchronous Discover sample (C++)


AsyncState Property

AXIS Camera Management SDK 2.00

DiscoverEventArgs.AsyncState Property

Gets an object containing information about the DiscoverEventArgs.

[Visual Basic]
Public ReadOnly Property AsyncState As Object
[C#]
public object AsyncState {get;}

Property Value

An object containing information about the DiscoverEventArgs.

Example

See discover samples (C#), synchronous discover sample (C++) and asynchronous discover sample (C++) on how to use the Discover methods.

See Also

DiscoverEventArgs Class | DeviceMgr Namespace | Discover | Discover samples (C#) | Synchronous Discover sample (C++) | Asynchronous Discover sample (C++)


DiscoveredDevice Property

AXIS Camera Management SDK 2.00

DiscoverEventArgs.DiscoveredDevice Property

Gets the discovered device.

[Visual Basic]
Public ReadOnly Property DiscoveredDevice As DiscoveredDevice
[C#]
public DiscoveredDevice DiscoveredDevice {get;}

Property Value

The discovered device.

Example

See discover samples (C#), synchronous discover sample (C++) and asynchronous discover sample (C++) on how to use the Discover methods.

See Also

DiscoverEventArgs Class | DeviceMgr Namespace | Discover | Discover samples (C#) | Synchronous Discover sample (C++) | Asynchronous Discover sample (C++)


DiscoveryEventHandler Delegate

Represents the method that will handle the DiscoverUpdate event of Discover.

[Visual Basic]
Public Delegate Sub DiscoveryEventHandler( _
ByVal sender As Object, _
ByVal e As DiscoverEventArgs _
)
[C#]
public delegate void DiscoveryEventHandler(
object sender,
DiscoverEventArgs e
);

Parameters

sender
The source of the event.
e
A DiscoverEventArgs that contains the event data.

Remarks

When you create a DiscoveryEventHandler delegate, you identify the method that will handle the event. To associate the event with your event handler, add an instance of the delegate to the event. The event handler is called whenever the event occurs, unless you remove the delegate.

Example

See discover samples (C#), synchronous discover sample (C++) and asynchronous discover sample (C++) on how to use the Discover methods.

Requirements

Namespace: DeviceMgr

Assembly: DeviceMgr (in DeviceMgr.dll)

See Also

DeviceMgr Namespace | Discover | Discover samples (C#) | Synchronous Discover sample (C++) | Asynchronous Discover sample (C++)


Imaging Class

Used when getting image snapshots from devices on the network. Snapshots from network cameras as well as video servers with multiple camera sources, e.g. AXIS 241Q, are supported.

For a list of all members of this type, see Imaging Members.

System.Object
DeviceMgr.Imaging

[Visual Basic]
Public Class Imaging
[C#]
public class Imaging

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

A JPEG (Joint Photographic Experts Group), also known as JPG, image is got from a video device. The source, which is device dependent (networks cameras have fewer sources than most video servers), and resolution are essential parameters while the file name of the saved image is optional. The image, as a byte array, is returned either way by EndGetImage or GetImage.

Example

See imaging sample (C#) on how to use the Imaging methods.

Requirements

Namespace: DeviceMgr

Assembly: DeviceMgr (in DeviceMgr.dll)

See Also

Imaging Members | DeviceMgr Namespace | Get image sample (C#) | The Asynchronous Pattern


Imaging Members

Imaging overview

Public Static (Shared) Methods

AddGetImage | Adds the function to get an image to an existing Operation.
GetImage | Overloaded. Extracts the byte array containing the image from a Result.

Public Instance Constructors

Imaging Constructor Initializes a new instance of the Imaging class.

Public Instance Methods

BeginGetImage | Begins an asynchronous request for getting an image from a device.
Cancel | Cancels asynchronous requests started with the BeginGetImage method.
EndGetImage | Overloaded. Waits for BeginGetImage to end and returns the byte array containing the image.
GetImage | Overloaded. Gets a image snapshot from a device.

Public Instance Events

ProgressUpdate Progress event during a BeginGetImage and GetImage request.

See Also

Imaging Class | DeviceMgr Namespace | Get image sample (C#) | The Asynchronous Pattern


Imaging Constructor

Initializes a new instance of the Imaging class.

[Visual Basic]
Public Sub New()
[C#]
public Imaging();

Example

See imaging sample (C#) on how to use the Imaging methods.

See Also

Imaging Class | DeviceMgr Namespace | Get image sample (C#)


Imaging Methods

The methods of the Imaging class are listed below. For a complete list of Imaging class members, see the Imaging Members topic.

Public Static (Shared) Methods

AddGetImage | Adds the function to get an image to an existing Operation.
GetImage | Overloaded. Extracts the byte array containing the image from a Result.

Public Instance Methods

BeginGetImage | Begins an asynchronous request for getting an image from a device.
Cancel | Cancels asynchronous requests started with the BeginGetImage method.
EndGetImage | Overloaded. Waits for BeginGetImage to end and returns the byte array containing the image.
GetImage | Overloaded. Gets a image snapshot from a device.

See Also

Imaging Class | DeviceMgr Namespace | Get image sample (C#) | The Asynchronous Pattern


Imaging.AddGetImage Method

Adds the function to get an image to an existing Operation.

[Visual Basic]
Public Shared Sub AddGetImage( _
ByVal operation As Operation, _
ByVal connectionInfo As ConnectionInfo, _
ByVal source As String, _
ByVal resolution As String, _
ByVal saveFilePath As String, _
ByVal state As Object _
)
[C#]
public static void AddGetImage(
Operation operation,
ConnectionInfo connectionInfo,
string source,
string resolution,
string saveFilePath,
object state
);

Parameters

operation
The operation this function is added to.
connectionInfo
The connection info used when accessing the device.
source
The camera source. Video servers can have more than one video input (e.g. AXIS 241Q has four, i.e. "1", "2", "3", "4" and the collage named "quad") while network cameras have one.
resolution
Specifies the resolution as width times height number of pixels or the name, e.g. CIF, of the returned image.
saveFilePath
The file name of the saved image.
state
A user provided object that is passed to the method invoked when the asynchronous operation completes or in the result and can e.g. contain user state information.

Example

See imaging sample (C#) on how to use the Imaging methods.

See Also

Imaging Class | DeviceMgr Namespace | Get image sample (C#) | Axis Video Parameters


Imaging.BeginGetImage Method

Begins an asynchronous request for getting an image from a device.

[Visual Basic]
Public Function BeginGetImage( _
ByVal connectionInfo As ConnectionInfo, _
ByVal source As String, _
ByVal resolution As String, _
ByVal saveFilePath As String, _
ByVal callback As AsyncCallback, _
ByVal state As Object _
) As IAsyncResult
[C#]
public IAsyncResult BeginGetImage(
ConnectionInfo connectionInfo,
string source,
string resolution,
string saveFilePath,
AsyncCallback callback,
object state
);

Parameters

connectionInfo
The connection info used when accessing the device.
source
The camera source. Video servers can have more than one video input (e.g. AXIS 241Q has four, i.e. "1", "2", "3", "4" and the collage named "quad") while network cameras have one.
resolution
Specifies the resolution as width times height number of pixels or the name, e.g. CIF, of the returned image.
saveFilePath
The file name of the saved image.
callback
The AsyncCallback delegate.
state
A user provided object that is passed to the method invoked when the asynchronous operation completes or in the result and can e.g. contain user state information.

Return Value

An IAsyncResult that references the asynchronous request.

Remarks

The BeginGetImage method starts an asynchronous request for getting an image from a device. The callback method that implements the AsyncCallback delegate uses the EndGetImage method to return a byte array containing the image.

Example

See imaging sample (C#) on how to use the Imaging methods.

See Also

Imaging Class | DeviceMgr Namespace | Get image sample (C#) | The Asynchronous Pattern | Axis Video Parameters


Imaging.Cancel Method

Cancels asynchronous requests started with the BeginGetImage method.

[Visual Basic]
Public Sub Cancel( _
ByVal ar As IAsyncResult _
)
[C#]
public void Cancel(
IAsyncResult ar
);

Parameters

ar
The IAsyncResult handle returned by the corresponding Begin method.

Remarks

A Cancel call will not block and wait for the request to be canceled. Use asyncResult.AsyncWaitHandle.WaitOne(); or corresponding End method to wait for the request to be canceled or completed.

The returned values in the case of a subsequent corresponding End method depends on the timing of the Cancel call.

Note Canceling an ongoing request may produce an undefined result. For example, depending on the timing of the Cancel call, the request may have finished before the call could cancel it. Or in the case of an upgrade request, the firmware file may have been sent to the device, which will continue the upgrade even if the connection is disconnected by a cancel.

Example

See imaging sample (C#) on how to use the Imaging methods.

See Also

Imaging Class | DeviceMgr Namespace | Get image sample (C#) | The Asynchronous Pattern


EndGetImage Method

AXIS Camera Management SDK 2.00

Imaging.EndGetImage Method

Waits for BeginGetImage to end and returns the byte array containing the image.

Overload List

Waits for BeginGetImage to end and returns the byte array containing the image.

public byte[] EndGetImage(IAsyncResult);

Waits for BeginGetImage to end and returns the byte array containing the image and the Result.

public byte[] EndGetImage(IAsyncResult,out Result);

See Also

Imaging Class | DeviceMgr Namespace | Get image sample (C#) | The Asynchronous Pattern


Imaging.EndGetImage Method (IAsyncResult)

Waits for BeginGetImage to end and returns the byte array containing the image.

[Visual Basic]
Overloads Public Function EndGetImage( _
ByVal ar As IAsyncResult _
) As Byte()
[C#]
public byte[] EndGetImage(
IAsyncResult ar
);

Parameters

ar
The IAsyncResult handle returned by the corresponding Begin method.

Return Value

The byte array containing the image if Imaging was successful; otherwise null.

Example

See imaging sample (C#) on how to use the Imaging methods.

See Also

Imaging Class | DeviceMgr Namespace | Imaging.EndGetImage Overload List | Get image sample (C#) | The Asynchronous Pattern


Imaging.EndGetImage Method (IAsyncResult, Result)

Waits for BeginGetImage to end and returns the byte array containing the image and the Result.

[Visual Basic]
Overloads Public Function EndGetImage( _
ByVal ar As IAsyncResult, _
ByRef result As Result _
) As Byte()
[C#]
public byte[] EndGetImage(
IAsyncResult ar,
out Result result
);

Parameters

ar
The IAsyncResult handle returned by the corresponding Begin method.
result
The Result describing the function status.

Return Value

The byte array containing the image if Imaging was successful; otherwise null.

Example

See imaging sample (C#) on how to use the Imaging methods.

See Also

Imaging Class | DeviceMgr Namespace | Imaging.EndGetImage Overload List | Get image sample (C#) | The Asynchronous Pattern


GetImage Method

AXIS Camera Management SDK 2.00

Imaging.GetImage Method

Gets a image snapshot from a device.

Overload List

Gets a image snapshot from a device.

public byte[] GetImage(ConnectionInfo,string,string,string);

Extracts the byte array containing the image from a Result.

public static byte[] GetImage(Result);

See Also

Imaging Class | DeviceMgr Namespace | Get image sample (C#) | Axis Video Parameters


Imaging.GetImage Method (ConnectionInfo, String, String, String)

Gets a image snapshot from a device.

[Visual Basic]
Overloads Public Function GetImage( _
ByVal connectionInfo As ConnectionInfo, _
ByVal source As String, _
ByVal resolution As String, _
ByVal saveFilePath As String _
) As Byte()
[C#]
public byte[] GetImage(
ConnectionInfo connectionInfo,
string source,
string resolution,
string saveFilePath
);

Parameters

connectionInfo
The connection info used when accessing the device.
source
The camera source. Video servers can have more than one video input (e.g. AXIS 241Q has four, i.e. "1", "2", "3", "4" and the collage named "quad") while network cameras have one.
resolution
Specifies the resolution as width times height number of pixels or the name, e.g. CIF, of the returned image.
saveFilePath
The file name of the saved image.

Return Value

The byte array containing the image if Imaging was successful; otherwise null.

Example

See imaging sample (C#) on how to use the Imaging methods.

See Also

Imaging Class | DeviceMgr Namespace | Imaging.GetImage Overload List | Get image sample (C#) | Axis Video Parameters


Imaging.GetImage Method (Result)

Extracts the byte array containing the image from a Result.

[Visual Basic]
Overloads Public Shared Function GetImage( _
ByVal result As Result _
) As Byte()
[C#]
public static byte[] GetImage(
Result result
);

Parameters

result
The Result describing the function status.

Return Value

The byte array containing the image if Imaging was successful; otherwise null.

Example

See imaging sample (C#) on how to use the Imaging methods.

See Also

Imaging Class | DeviceMgr Namespace | Imaging.GetImage Overload List | Get image sample (C#)


Imaging Events

The events of the Imaging class are listed below. For a complete list of Imaging class members, see the Imaging Members topic.

Public Instance Events

ProgressUpdate Progress event during a BeginGetImage and GetImage request.

See Also

Imaging Class | DeviceMgr Namespace | Get image sample (C#) | The Asynchronous Pattern


Imaging.ProgressUpdate Event

Progress event during a BeginGetImage and GetImage request.

[Visual Basic]
Public Event ProgressUpdate As ProgressEventHandler
[C#]
public event ProgressEventHandler ProgressUpdate;

Event Data

The event handler receives an argument of type ProgressEventArgs containing data related to this event. The following ProgressEventArgs properties provide information specific to this event.

Property | Description
AsyncState | Gets an object containing information about the ProgressEventArgs.
Progress | Gets the progress percent.

Example

See imaging sample (C#) on how to use the Imaging methods.

See Also

Imaging Class | DeviceMgr Namespace | Get image sample (C#)


Maintenance Class

Used for restarting and setting factory default.

For a list of all members of this type, see Maintenance Members.

System.Object
DeviceMgr.Maintenance

[Visual Basic]
Public Class Maintenance
[C#]
public class Maintenance

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

Maintenance is a collective name for restarting and setting factory default. These two operations forces the video device to reboot, and thus disconnect from the network. Restarting and resetting to normal factory default will not change the TCP/IP settings while a hard factory default will.

Example

See maintenance samples (C#) on how to use the Maintenance methods.

Requirements

Namespace: DeviceMgr

Assembly: DeviceMgr (in DeviceMgr.dll)

See Also

Maintenance Members | DeviceMgr Namespace | Maintenance samples (C#) | The Asynchronous Pattern


Maintenance Members

Maintenance overview

Public Static (Shared) Methods

AddFactoryDefault | Adds the function to set factory default to an existing Operation.
AddRestart | Adds the function to restart a device to an existing Operation.

Public Instance Constructors

Maintenance Constructor Initializes a new instance of the Maintenance class.

Public Instance Methods

BeginFactoryDefault | Begins an asynchronous request for setting factory default on a device.
BeginRestart | Begins an asynchronous request of restarting a device. An attempt to reconnect after the restart is performed.
Cancel | Cancels an operation. Does not wait for the cancel to complete. Use End methods for waiting.
EndFactoryDefault | Waits for BeginFactoryDefault to end and returns the Result.
EndRestart | Waits for BeginRestart to end and returns the Result.
FactoryDefault | Sets factory default on a device.
Restart | Restarts a device.

Public Instance Events

ProgressUpdate Progress event during a BeginFactoryDefault, BeginRestart, FactoryDefault and Restart requests.

See Also

Maintenance Class | DeviceMgr Namespace | Maintenance samples (C#) | The Asynchronous Pattern


Maintenance Constructor

Initializes a new instance of the Maintenance class.

[Visual Basic]
Public Sub New()
[C#]
public Maintenance();

Example

See maintenance samples (C#) on how to use the Maintenance methods.

See Also

Maintenance Class | DeviceMgr Namespace | Maintenance samples (C#)


Maintenance Methods

The methods of the Maintenance class are listed below. For a complete list of Maintenance class members, see the Maintenance Members topic.

Public Static (Shared) Methods

AddFactoryDefault | Adds the function to set factory default to an existing Operation.
AddRestart | Adds the function to restart a device to an existing Operation.

Public Instance Methods

BeginFactoryDefault | Begins an asynchronous request for setting factory default on a device.
BeginRestart | Begins an asynchronous request of restarting a device. An attempt to reconnect after the restart is performed.
Cancel | Cancels an operation. Does not wait for the cancel to complete. Use End methods for waiting.
EndFactoryDefault | Waits for BeginFactoryDefault to end and returns the Result.
EndRestart | Waits for BeginRestart to end and returns the Result.
FactoryDefault | Sets factory default on a device.
Restart | Restarts a device.

See Also

Maintenance Class | DeviceMgr Namespace | Maintenance samples (C#) | The Asynchronous Pattern


Maintenance.AddFactoryDefault Method

Adds the function to set factory default to an existing Operation.

[Visual Basic]
Public Shared Sub AddFactoryDefault( _
ByVal operation As Operation, _
ByVal connectionInfo As ConnectionInfo, _
ByVal hard As Boolean, _
ByVal state As Object _
)
[C#]
public static void AddFactoryDefault(
Operation operation,
ConnectionInfo connectionInfo,
bool hard,
object state
);

Parameters

operation
The operation this function is added to.
connectionInfo
The connection info used when accessing the device.
hard
true to reset all parameters to original factory settings; false to reset all parameters, except TCP/IP settings, to original factory settings.
state
A user provided object that is passed to the method invoked when the asynchronous operation completes or in the result and can e.g. contain user state information.

Remarks

Setting factory default may result in a situation where the device will become inaccessible. An attempt to reconnect after normal factory default is performed.

Note After setting hard factory default the device's IP address is 192.168.0.90 on networks with no DHCP-server.

Example

See maintenance samples (C#) on how to use the Maintenance methods.

See Also

Maintenance Class | DeviceMgr Namespace | Maintenance samples (C#)


Maintenance.AddRestart Method

Adds the function to restart a device to an existing Operation.

[Visual Basic]
Public Shared Sub AddRestart( _
ByVal operation As Operation, _
ByVal connectionInfo As ConnectionInfo, _
ByVal state As Object _
)
[C#]
public static void AddRestart(
Operation operation,
ConnectionInfo connectionInfo,
object state
);

Parameters

operation
The operation this function is added to.
connectionInfo
The connection info used when accessing the device.
state
A user provided object that is passed to the method invoked when the asynchronous operation completes or in the result and can e.g. contain user state information.

Example

See maintenance samples (C#) on how to use the Maintenance methods.

See Also

Maintenance Class | DeviceMgr Namespace | Maintenance samples (C#)


Maintenance.BeginFactoryDefault Method

Begins an asynchronous request for setting factory default on a device.

[Visual Basic]
Public Function BeginFactoryDefault( _
ByVal connectionInfo As ConnectionInfo, _
ByVal hard As Boolean, _
ByVal callback As AsyncCallback, _
ByVal state As Object _
) As IAsyncResult
[C#]
public IAsyncResult BeginFactoryDefault(
ConnectionInfo connectionInfo,
bool hard,
AsyncCallback callback,
object state
);

Parameters

connectionInfo
The connection info used when accessing the device.
hard
true to reset all parameters to original factory settings; false to reset all parameters, except TCP/IP settings, to original factory settings.
callback
The AsyncCallback delegate.
state
A user provided object that is passed to the method invoked when the asynchronous operation completes or in the result and can e.g. contain user state information.

Return Value

An IAsyncResult that references the asynchronous request.

Remarks

The BeginFactoryDefault method starts an asynchronous request for setting factory default on a device. The callback method that implements the AsyncCallback delegate uses the EndFactoryDefault method to return the Result.

Setting factory default may result in a situation where the device will become inaccessible. An attempt to reconnect after normal factory default is performed.

Note After setting hard factory default the device's IP address is 192.168.0.90 on networks with no DHCP-server.

Example

See maintenance sample (C#) on how to reset factory default using the Maintenance methods.

See Also

Maintenance Class | DeviceMgr Namespace | Factory default sample (C#) | The Asynchronous Pattern


Maintenance.BeginRestart Method

Begins an asynchronous request of restarting a device. An attempt to reconnect after the restart is performed.

[Visual Basic]
Public Function BeginRestart( _
ByVal connectionInfo As ConnectionInfo, _
ByVal callback As AsyncCallback, _
ByVal state As Object _
) As IAsyncResult
[C#]
public IAsyncResult BeginRestart(
ConnectionInfo connectionInfo,
AsyncCallback callback,
object state
);

Parameters

connectionInfo
The connection info used when accessing the device.
callback
The AsyncCallback delegate.
state
A user provided object that is passed to the method invoked when the asynchronous operation completes or in the result and can e.g. contain user state information.

Return Value

An IAsyncResult that references the asynchronous request.

Remarks

The BeginRestart method starts an asynchronous request for restarting a device. The callback method that implements the AsyncCallback delegate uses the EndRestart method to return the Result

Example

See maintenance sample (C#) on how to restart a device using the Maintenance methods.

See Also

Maintenance Class | DeviceMgr Namespace | Restart sample (C#) | The Asynchronous Pattern


Maintenance.Cancel Method

Cancels an operation. Does not wait for the cancel to complete. Use End methods for waiting.

[Visual Basic]
Public Sub Cancel( _
ByVal ar As IAsyncResult _
)
[C#]
public void Cancel(
IAsyncResult ar
);

Parameters

ar
The IAsyncResult handle returned by the corresponding Begin method.

Remarks

A Cancel call will not block and wait for the request to be canceled. Use asyncResult.AsyncWaitHandle.WaitOne(); or corresponding End method to wait for the request to be canceled or completed.

The returned values in the case of a subsequent corresponding End method depends on the timing of the Cancel call.

Note Canceling an ongoing request may produce an undefined result. For example, depending on the timing of the Cancel call, the request may have finished before the call could cancel it. Or in the case of an upgrade request, the firmware file may have been sent to the device, which will continue the upgrade even if the connection is disconnected by a cancel.

Example

See maintenance samples (C#) on how to use the Maintenance methods.

See Also

Maintenance Class | DeviceMgr Namespace | Maintenance samples (C#) | The Asynchronous Pattern


Maintenance.EndFactoryDefault Method

Waits for BeginFactoryDefault to end and returns the Result.

[Visual Basic]
Public Function EndFactoryDefault( _
ByVal ar As IAsyncResult _
) As Result
[C#]
public Result EndFactoryDefault(
IAsyncResult ar
);

Parameters

ar
The IAsyncResult handle returned by the corresponding Begin method.

Return Value

The Result describing the function status.

Example

See maintenance sample (C#) on how to reset factory default using the Maintenance methods.

See Also

Maintenance Class | DeviceMgr Namespace | Factory default sample (C#) | The Asynchronous Pattern


Maintenance.EndRestart Method

Waits for BeginRestart to end and returns the Result.

[Visual Basic]
Public Function EndRestart( _
ByVal ar As IAsyncResult _
) As Result
[C#]
public Result EndRestart(
IAsyncResult ar
);

Parameters

ar
The IAsyncResult handle returned by the corresponding Begin method.

Return Value

The Result describing the function status.

Example

See maintenance sample (C#) on how to restart a device using the Maintenance methods.

See Also

Maintenance Class | DeviceMgr Namespace | Restart sample (C#) | The Asynchronous Pattern


Maintenance.FactoryDefault Method

Sets factory default on a device.

[Visual Basic]
Public Function FactoryDefault( _
ByVal connectionInfo As ConnectionInfo, _
ByVal hard As Boolean _
) As Boolean
[C#]
public bool FactoryDefault(
ConnectionInfo connectionInfo,
bool hard
);

Parameters

connectionInfo
The connection info used when accessing the device.
hard
true to reset all parameters to original factory settings; false to reset all parameters, except TCP/IP settings, to original factory settings.

Return Value

true if setting factory default was successful; otherwise false.

Remarks

Setting factory default may result in a situation where the device will become inaccessible. An attempt to reconnect after normal factory default is performed.

Note After setting hard factory default the device's IP address is 192.168.0.90 on networks with no DHCP-server.

Example

See maintenance samples (C#) on how to use the Maintenance methods.

See Also

Maintenance Class | DeviceMgr Namespace | Maintenance samples (C#)


Maintenance.Restart Method

Restarts a device.

[Visual Basic]
Public Function Restart( _
ByVal connectionInfo As ConnectionInfo _
) As Boolean
[C#]
public bool Restart(
ConnectionInfo connectionInfo
);

Parameters

connectionInfo
The connection info used when accessing the device.

Return Value

true if reconnect was successful after restart; otherwise false.

Remarks

An attempt to reconnect after the restart is performed.

Example

See maintenance samples (C#) on how to use the Maintenance methods.

See Also

Maintenance Class | DeviceMgr Namespace | Maintenance samples (C#)


Maintenance Events

The events of the Maintenance class are listed below. For a complete list of Maintenance class members, see the Maintenance Members topic.

Public Instance Events

ProgressUpdate Progress event during a BeginFactoryDefault, BeginRestart, FactoryDefault and Restart requests.

See Also

Maintenance Class | DeviceMgr Namespace | Maintenance samples (C#) | The Asynchronous Pattern


Maintenance.ProgressUpdate Event

Progress event during a BeginFactoryDefault, BeginRestart, FactoryDefault and Restart requests.

[Visual Basic]
Public Event ProgressUpdate As ProgressEventHandler
[C#]
public event ProgressEventHandler ProgressUpdate;

Event Data

The event handler receives an argument of type ProgressEventArgs containing data related to this event. The following ProgressEventArgs properties provide information specific to this event.

Property | Description
AsyncState | Gets an object containing information about the ProgressEventArgs.
Progress | Gets the progress percent.

Example

See maintenance samples (C#) on how to use the Maintenance methods.

See Also

Maintenance Class | DeviceMgr Namespace | Maintenance samples (C#)


Operation Class

Container created by OperationMgr for one or multiple functions that can be run in parallel or in sequence.

For a list of all members of this type, see Operation Members.

System.Object
DeviceMgr.Operation

[Visual Basic]
Public Class Operation
[C#]
public class Operation

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

Adding functions to an Operation created by OperationMgr is done by calling the Add methods in the function interfaces. E.g. use the AssignIP.AddSetIP function to add SetIP functions to an Operation.

An Operation can be added to another Operation making it possible to create a mixtures of parallel and sequential functions in a tree-like structure.

Progress is estimated, depending on the containing functions, and events are sent every 0.5 seconds. If sub functions update their progress, the values are included in the progress estimations.

Note Adding functions and operations to an operation that has started is not supported.

Example

See operation sample (C#) and operation sample (C++) on how to use the Operation and OperationMgr methods.

Requirements

Namespace: DeviceMgr

Assembly: DeviceMgr (in DeviceMgr.dll)

See Also

Operation Members | DeviceMgr Namespace | OperationMgr | Operation and OperationMgr sample (C#) | Operation sample (C++)


Operation Members

Operation overview

Public Instance Methods

Add Adds an Operation.

See Also

Operation Class | DeviceMgr Namespace | OperationMgr | Operation and OperationMgr sample (C#) | Operation sample (C++)


Operation Methods

The methods of the Operation class are listed below. For a complete list of Operation class members, see the Operation Members topic.

Public Instance Methods

Add Adds an Operation.

See Also

Operation Class | DeviceMgr Namespace | OperationMgr | Operation and OperationMgr sample (C#) | Operation sample (C++)


Operation.Add Method

Adds an Operation.

[Visual Basic]
Public Sub Add( _
ByVal operation As Operation _
)
[C#]
public void Add(
Operation operation
);

Parameters

operation
The Operation being added.

Remarks

Note It is possible to create mixtures of parallel and sequential functions in a tree-like structure by adding one Operation to another.
Note Adding functions and operations to an operation that has started is not supported.

Example

See operation sample (C#) and operation sample (C++) on how to use the Operation and OperationMgr methods.

See Also

Operation Class | DeviceMgr Namespace | OperationMgr | Operation and OperationMgr sample (C#) | Operation sample (C++)


OperationMgr Class

Creates and manages Operation(s) and reports the progress.

For a list of all members of this type, see OperationMgr Members.

System.Object
DeviceMgr.OperationMgr

[Visual Basic]
Public Class OperationMgr
[C#]
public class OperationMgr

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

OperationMgr is used to create and run Operation(s). Operations are containers of other operations or functions, while functions are the basic functions like e.g. SetIP in AssignIP or Upgrade in Upgrade.

It is often a good idea to bundle several operations/functions into one Operation. E.g. if a lot of devices would be upgraded, it is nice add all the upgrade functions for the different devices into one operation and let the OperationMgr run all functions as one operation. Progress will be reported for the total of all functions. The Operation can be created to run the functions in parallel or in sequence.

Example

See operation sample (C#) and operation sample (C++) on how to use the Operation and OperationMgr methods.

Requirements

Namespace: DeviceMgr

Assembly: DeviceMgr (in DeviceMgr.dll)

See Also

OperationMgr Members | DeviceMgr Namespace | Operation | Operation and OperationMgr sample (C#) | Operation sample (C++) | The Asynchronous Pattern


OperationMgr Members

OperationMgr overview

Public Static (Shared) Methods

CreateParallelOperation | Creates an Operation where added functions will be started in parallel.
CreateSequenceOperation | Creates an Operation where added functions will be started in sequence.

Public Instance Constructors

OperationMgr Constructor Initializes a new instance of the OperationMgr class.

Public Instance Methods

BeginOperation | Begins an asynchronous request for starting an Operation containing functions.
Cancel | Cancels asynchronous requests started with the BeginOperation method.
EndOperation | Waits for BeginOperation to end and returns the ResultList.

Public Instance Events

ProgressUpdate Progress event during a BeginOperation request.

See Also

OperationMgr Class | DeviceMgr Namespace | Operation | Operation and OperationMgr sample (C#) | Operation sample (C++) | The Asynchronous Pattern


OperationMgr Constructor

Initializes a new instance of the OperationMgr class.

[Visual Basic]
Public Sub New()
[C#]
public OperationMgr();

Example

See operation sample (C#) and operation sample (C++) on how to use the Operation and OperationMgr methods.

See Also

OperationMgr Class | DeviceMgr Namespace | Operation | Operation and OperationMgr sample (C#) | Operation sample (C++)


OperationMgr Methods

The methods of the OperationMgr class are listed below. For a complete list of OperationMgr class members, see the OperationMgr Members topic.

Public Static (Shared) Methods

CreateParallelOperation | Creates an Operation where added functions will be started in parallel.
CreateSequenceOperation | Creates an Operation where added functions will be started in sequence.

Public Instance Methods

BeginOperation | Begins an asynchronous request for starting an Operation containing functions.
Cancel | Cancels asynchronous requests started with the BeginOperation method.
EndOperation | Waits for BeginOperation to end and returns the ResultList.

See Also

OperationMgr Class | DeviceMgr Namespace | Operation | Operation and OperationMgr sample (C#) | Operation sample (C++) | The Asynchronous Pattern


OperationMgr.BeginOperation Method

Begins an asynchronous request for starting an Operation containing functions.

[Visual Basic]
Public Function BeginOperation( _
ByVal operationHandle As Operation, _
ByVal callback As AsyncCallback, _
ByVal state As Object _
) As IAsyncResult
[C#]
public IAsyncResult BeginOperation(
Operation operationHandle,
AsyncCallback callback,
object state
);

Parameters

operationHandle
The Operation to run. It may contain several sub operations, each with parallel or sequence functions.
callback
The AsyncCallback delegate.
state
A user provided object that is passed to the method invoked when the asynchronous operation completes or in the result and can e.g. contain user state information.

Return Value

An IAsyncResult that references the asynchronous request.

Remarks

The BeginOperation method starts an asynchronous request for starting an Operation containing functions. The callback method that implements the AsyncCallback delegate uses the EndOperation method to return the ResultList.

Example

See operation sample (C#) and operation sample (C++) on how to use the Operation and OperationMgr methods.

See Also

OperationMgr Class | DeviceMgr Namespace | Operation | Operation and OperationMgr sample (C#) | Operation sample (C++) | The Asynchronous Pattern


OperationMgr.Cancel Method

Cancels asynchronous requests started with the BeginOperation method.

[Visual Basic]
Public Sub Cancel( _
ByVal ar As IAsyncResult _
)
[C#]
public void Cancel(
IAsyncResult ar
);

Parameters

ar
The IAsyncResult handle returned by the corresponding Begin method.

Remarks

A Cancel call will not block and wait for the request to be canceled. Use asyncResult.AsyncWaitHandle.WaitOne(); or corresponding End method to wait for the request to be canceled or completed.

The returned values in the case of a subsequent corresponding End method depends on the timing of the Cancel call.

Note Canceling an ongoing request may produce an undefined result. For example, depending on the timing of the Cancel call, the request may have finished before the call could cancel it. Or in the case of an upgrade request, the firmware file may have been sent to the device, which will continue the upgrade even if the connection is disconnected by a cancel.

Example

See operation sample (C#) and operation sample (C++) on how to use the Operation and OperationMgr methods.

See Also

OperationMgr Class | DeviceMgr Namespace | Operation | Operation and OperationMgr sample (C#) | Operation sample (C++) | The Asynchronous Pattern


OperationMgr.CreateParallelOperation Method

Creates an Operation where added functions will be started in parallel.

[Visual Basic]
Public Shared Function CreateParallelOperation() As Operation
[C#]
public static Operation CreateParallelOperation();

Return Value

A Operation where added functions will be started in parallel.

Example

See operation sample (C#) and operation sample (C++) on how to use the Operation and OperationMgr methods.

See Also

OperationMgr Class | DeviceMgr Namespace | Operation | Operation and OperationMgr sample (C#) | Operation sample (C++)


OperationMgr.CreateSequenceOperation Method

Creates an Operation where added functions will be started in sequence.

[Visual Basic]
Public Shared Function CreateSequenceOperation( _
ByVal stopOnError As Boolean _
) As Operation
[C#]
public static Operation CreateSequenceOperation(
bool stopOnError
);

Parameters

stopOnError
true to cancel progressing function as well as remaining functions if one fails; otherwise false.

Return Value

A Operation where added functions will be started in parallel.

Example

See operation sample (C#) and operation sample (C++) on how to use the Operation and OperationMgr methods.

See Also

OperationMgr Class | DeviceMgr Namespace | Operation | Operation and OperationMgr sample (C#) | Operation sample (C++)


OperationMgr.EndOperation Method

Waits for BeginOperation to end and returns the ResultList.

[Visual Basic]
Public Function EndOperation( _
ByVal ar As IAsyncResult _
) As ResultList
[C#]
public ResultList EndOperation(
IAsyncResult ar
);

Parameters

ar
The IAsyncResult handle returned by the corresponding Begin method.

Return Value

A ResultList describing the status of the Operation.

Example

See operation sample (C#) and operation sample (C++) on how to use the Operation and OperationMgr methods.

See Also

OperationMgr Class | DeviceMgr Namespace | Operation | Operation and OperationMgr sample (C#) | Operation sample (C++) | The Asynchronous Pattern


OperationMgr Events

The events of the OperationMgr class are listed below. For a complete list of OperationMgr class members, see the OperationMgr Members topic.

Public Instance Events

ProgressUpdate Progress event during a BeginOperation request.

See Also

OperationMgr Class | DeviceMgr Namespace | Operation | Operation and OperationMgr sample (C#) | Operation sample (C++) | The Asynchronous Pattern


OperationMgr.ProgressUpdate Event

Progress event during a BeginOperation request.

[Visual Basic]
Public Event ProgressUpdate As ProgressEventHandler
[C#]
public event ProgressEventHandler ProgressUpdate;

Event Data

The event handler receives an argument of type ProgressEventArgs containing data related to this event. The following ProgressEventArgs properties provide information specific to this event.

Property | Description
AsyncState | Gets an object containing information about the ProgressEventArgs.
Progress | Gets the progress percent.

Example

See operation sample (C#) and operation sample (C++) on how to use the Operation and OperationMgr methods.

See Also

OperationMgr Class | DeviceMgr Namespace | Operation and OperationMgr sample (C#) | Operation sample (C++)


Parameter Class

Containing Parameter names and values used by e.g. Config.

For a list of all members of this type, see Parameter Members.

System.Object
DeviceMgr.Parameter

[Visual Basic]
Public Class Parameter
[C#]
public class Parameter

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

A Parameter is described by its Name and Value. It can be added to a ParameterList used by e.g. Config.Set or extracted from a Result.ParameterList after completing a function.

Example

See config samples (C#) on how to use the Config methods.

Requirements

Namespace: DeviceMgr

Assembly: DeviceMgr (in DeviceMgr.dll)

See Also

Parameter Members | DeviceMgr Namespace | Result | Config | Get parameters sample (C#)


Parameter Members

Parameter overview

Public Instance Constructors

Parameter Constructor Initializes a new instance of the Parameter class with specified name and value.

Public Instance Properties

Name | Gets the name of the Parameter.
Value | Gets the value of the Parameter.

Public Instance Methods

ToString Converts the value of this instance to a String containing the Parameter name and value.

See Also

Parameter Class | DeviceMgr Namespace | Result | Config | Get parameters sample (C#)


Parameter Constructor

Initializes a new instance of the Parameter class with specified name and value.

[Visual Basic]
Overloads Public Sub New( _
ByVal name As String, _
ByVal value As String _
)
[C#]
public Parameter(
string name,
string value
);

Parameters

name
The name of the Parameter.
value
The value of the Parameter.

Example

See config samples (C#) on how to use the Config methods.

See Also

Parameter Class | DeviceMgr Namespace | Result | Config | Get parameters sample (C#)


Parameter Properties

The properties of the Parameter class are listed below. For a complete list of Parameter class members, see the Parameter Members topic.

Public Instance Properties

Name | Gets the name of the Parameter.
Value | Gets the value of the Parameter.

See Also

Parameter Class | DeviceMgr Namespace | Result | Config | Get parameters sample (C#)


Name Property

AXIS Camera Management SDK 2.00

Parameter.Name Property

Gets the name of the Parameter.

[Visual Basic]
Public ReadOnly Property Name As String
[C#]
public string Name {get;}

Property Value

The name of the Parameter.

Example

See config samples (C#) on how to use the Config methods.

See Also

Parameter Class | DeviceMgr Namespace | Result | Config | Get parameters sample (C#)


Value Property

AXIS Camera Management SDK 2.00

Parameter.Value Property

Gets the value of the Parameter.

[Visual Basic]
Public ReadOnly Property Value As String
[C#]
public string Value {get;}

Property Value

The value of the Parameter.

Example

See config samples (C#) on how to use the Config methods.

See Also

Parameter Class | DeviceMgr Namespace | Result | Config | Get parameters sample (C#)


Parameter Methods

The methods of the Parameter class are listed below. For a complete list of Parameter class members, see the Parameter Members topic.

Public Instance Methods

ToString Converts the value of this instance to a String containing the Parameter name and value.

See Also

Parameter Class | DeviceMgr Namespace | Result | Config | Get parameters sample (C#)


Parameter.ToString Method

Converts the value of this instance to a String containing the Parameter name and value.

[Visual Basic]
Overrides Public Function ToString() As String
[C#]
public override string ToString();

Return Value

A String whose value represents the Parameter.

Example

See config samples (C#) on how to use the Config methods.

See Also

Parameter Class | DeviceMgr Namespace | Result | Config | Get parameters sample (C#)


ParameterList Class

A list of Parameter objects.

For a list of all members of this type, see ParameterList Members.

System.Object
DeviceMgr.ParameterList

[Visual Basic]
Public Class ParameterList
Implements IEnumerable
[C#]
public class ParameterList : IEnumerable

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Example

See config samples (C#) on how to use the Config methods.

Requirements

Namespace: DeviceMgr

Assembly: DeviceMgr (in DeviceMgr.dll)

See Also

ParameterList Members | DeviceMgr Namespace | Result | Config | Parameter | Get parameters sample (C#)


ParameterList Members

ParameterList overview

Public Instance Constructors

ParameterList Constructor Initializes a new instance of the ParameterList class.

Public Instance Properties

Count | Gets the count of Parameter(s) in the list.
Item | Gets or sets the Parameter at the specified indexed location in the list.

Public Instance Methods

Add | Adds a Parameter to the end of the ParameterList.
AddRange | Adds the array of Parameter(s) to the end of the ParameterList.
Clear | Removes all elements from the ParameterList.
Get | Gets the value of a specific Parameter name.
GetEnumerator | Returns an enumerator that iterates through the Parameter(s).
ToString | Converts the value of this instance to a String containing the Parameter names and values in the ParameterList.

See Also

ParameterList Class | DeviceMgr Namespace | Result | Config | Parameter | Get parameters sample (C#)


ParameterList Constructor

Initializes a new instance of the ParameterList class.

[Visual Basic]
Overloads Public Sub New()
[C#]
public ParameterList();

Example

See config samples (C#) on how to use the Config methods.

See Also

ParameterList Class | DeviceMgr Namespace | Result | Config | Parameter | Get parameters sample (C#)


ParameterList Properties

The properties of the ParameterList class are listed below. For a complete list of ParameterList class members, see the ParameterList Members topic.

Public Instance Properties

Count | Gets the count of Parameter(s) in the list.
Item | Gets or sets the Parameter at the specified indexed location in the list.

See Also

ParameterList Class | DeviceMgr Namespace | Result | Config | Parameter | Get parameters sample (C#)


Count Property

AXIS Camera Management SDK 2.00

ParameterList.Count Property

Gets the count of Parameter(s) in the list.

[Visual Basic]
Public ReadOnly Property Count As Integer
[C#]
public int Count {get;}

Property Value

The number of Parameter(s) actually contained in the ParameterList.

Example

See config samples (C#) on how to use the Config methods.

See Also

ParameterList Class | DeviceMgr Namespace | Result | Config | Parameter | Get parameters sample (C#)


Item Property

AXIS Camera Management SDK 2.00

ParameterList.Item Property

Gets or sets the Parameter at the specified indexed location in the list.

[Visual Basic]
Public Default Property Item( _
ByVal index As Integer _
) As Parameter
[C#]
public Parameter this[
int index
] {get; set;}

Parameters

index
The indexed location of the Parameter in the list.

Property Value

The Parameter at the specified indexed location in the list.

Example

See config samples (C#) on how to use the Config methods.

See Also

ParameterList Class | DeviceMgr Namespace | Result | Config | Parameter | Get parameters sample (C#)


ParameterList Methods

The methods of the ParameterList class are listed below. For a complete list of ParameterList class members, see the ParameterList Members topic.

Public Instance Methods

Add | Adds a Parameter to the end of the ParameterList.
AddRange | Adds the array of Parameter(s) to the end of the ParameterList.
Clear | Removes all elements from the ParameterList.
Get | Gets the value of a specific Parameter name.
GetEnumerator | Returns an enumerator that iterates through the Parameter(s).
ToString | Converts the value of this instance to a String containing the Parameter names and values in the ParameterList.

See Also

ParameterList Class | DeviceMgr Namespace | Result | Config | Parameter | Get parameters sample (C#)


ParameterList.Add Method

Adds a Parameter to the end of the ParameterList.

[Visual Basic]
Public Sub Add( _
ByVal parameter As Parameter _
)
[C#]
public void Add(
Parameter parameter
);

Parameters

parameter
The Parameter to be added to the end of the ParameterList.

Example

See config samples (C#) on how to use the Config methods.

See Also

ParameterList Class | DeviceMgr Namespace | Result | Config | Parameter | Get parameters sample (C#)


ParameterList.AddRange Method

Adds the array of Parameter(s) to the end of the ParameterList.

[Visual Basic]
Public Sub AddRange( _
ByVal parameterList As Parameter() _
)
[C#]
public void AddRange(
Parameter[] parameterList
);

Parameters

parameterList
The array of Parameter(s) to be added to the end of the ParameterList.

Example

See config samples (C#) on how to use the Config methods.

See Also

ParameterList Class | DeviceMgr Namespace | Result | Config | Parameter | Get parameters sample (C#)


ParameterList.Clear Method

Removes all elements from the ParameterList.

[Visual Basic]
Public Sub Clear()
[C#]
public void Clear();

Example

See config samples (C#) on how to use the Config methods.

See Also

ParameterList Class | DeviceMgr Namespace | Result | Config | Parameter | Get parameters sample (C#)


ParameterList.Get Method

Gets the value of a specific Parameter name.

[Visual Basic]
Public Function Get( _
ByVal name As String _
) As String
[C#]
public string Get(
string name
);

Parameters

name
The name of the Parameter.

Return Value

The value of the existing Parameter in ParameterList; otherwise null.

Example

See config samples (C#) on how to use the Config methods.

See Also

ParameterList Class | DeviceMgr Namespace | Result | Config | Parameter | Get parameters sample (C#)


ParameterList.GetEnumerator Method

Returns an enumerator that iterates through the Parameter(s).

[Visual Basic]
NotOverridable Public Function GetEnumerator() As IEnumerator _
Implements IEnumerable.GetEnumerator
[C#]
public IEnumerator GetEnumerator();

Return Value

An IEnumerator for the ParameterList instance.

Implements

IEnumerable.GetEnumerator

Example

See config samples (C#) on how to use the Config methods.

See Also

ParameterList Class | DeviceMgr Namespace | Result | Config | Parameter | Get parameters sample (C#)


ParameterList.ToString Method

Converts the value of this instance to a String containing the Parameter names and values in the ParameterList.

[Visual Basic]
Overrides Public Function ToString() As String
[C#]
public override string ToString();

Return Value

A String whose value represents the Parameter(s) in the ParameterList.

Example

See config samples (C#) on how to use the Config methods.

See Also

ParameterList Class | DeviceMgr Namespace | Result | Config | Parameter | Get parameters sample (C#)


Pinger Class

Used to determine if an IP address is in use.

For a list of all members of this type, see Pinger Members.

System.Object
DeviceMgr.Pinger

[Visual Basic]
Public Class Pinger
[C#]
public class Pinger

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

The presence and configuration of proxies, network address translation (NAT) equipment, or firewalls can prevent Pinger from succeeding.

Example

See pinger sample (C#) on how to use the Pinger methods.

Requirements

Namespace: DeviceMgr

Assembly: DeviceMgr (in DeviceMgr.dll)

See Also

Pinger Members | DeviceMgr Namespace | Ping device sample (C#) | The Asynchronous Pattern


Pinger Members

Pinger overview

Public Static (Shared) Methods

AddPing Adds the function to decide if an address is used or not to an existing Operation.

Public Instance Constructors

Pinger Constructor Initializes a new instance of the Pinger class.

Public Instance Methods

BeginPing | Begins an asynchronous request to decide if an address is used or not.
Cancel | Cancels asynchronous requests started with the BeginPing method.
EndPing | Waits for BeginPing to end and returns the Result.
Ping | Decides if an address is used or not.

Public Instance Events

ProgressUpdate Progress event during a BeginPing and Ping request.

See Also

Pinger Class | DeviceMgr Namespace | Ping device sample (C#) | The Asynchronous Pattern


Pinger Constructor

Initializes a new instance of the Pinger class.

[Visual Basic]
Public Sub New()
[C#]
public Pinger();

Example

See pinger sample (C#) on how to use the Pinger methods.

See Also

Pinger Class | DeviceMgr Namespace | Ping device sample (C#)


Pinger Methods

The methods of the Pinger class are listed below. For a complete list of Pinger class members, see the Pinger Members topic.

Public Static (Shared) Methods

AddPing Adds the function to decide if an address is used or not to an existing Operation.

Public Instance Methods

BeginPing | Begins an asynchronous request to decide if an address is used or not.
Cancel | Cancels asynchronous requests started with the BeginPing method.
EndPing | Waits for BeginPing to end and returns the Result.
Ping | Decides if an address is used or not.

See Also

Pinger Class | DeviceMgr Namespace | Ping device sample (C#) | The Asynchronous Pattern


Pinger.AddPing Method

Adds the function to decide if an address is used or not to an existing Operation.

[Visual Basic]
Public Shared Sub AddPing( _
ByVal operation As Operation, _
ByVal connectionInfo As ConnectionInfo, _
ByVal state As Object _
)
[C#]
public static void AddPing(
Operation operation,
ConnectionInfo connectionInfo,
object state
);

Parameters

operation
The operation this function is added to.
connectionInfo
The connection info used when accessing the device.
state
A user provided object that is passed to the method invoked when the asynchronous operation completes or in the result and can e.g. contain user state information.

Example

See pinger sample (C#) on how to use the Pinger methods.

See Also

Pinger Class | DeviceMgr Namespace | Ping device sample (C#)


Pinger.BeginPing Method

Begins an asynchronous request to decide if an address is used or not.

[Visual Basic]
Public Function BeginPing( _
ByVal connectionInfo As ConnectionInfo, _
ByVal callback As AsyncCallback, _
ByVal state As Object _
) As IAsyncResult
[C#]
public IAsyncResult BeginPing(
ConnectionInfo connectionInfo,
AsyncCallback callback,
object state
);

Parameters

connectionInfo
The connection info used when accessing the device.
callback
The AsyncCallback delegate.
state
A user provided object that is passed to the method invoked when the asynchronous operation completes or in the result and can e.g. contain user state information.

Return Value

An IAsyncResult that references the asynchronous request.

Remarks

The BeginPing method starts an asynchronous request to decide if an address is used or not. The callback method that implements the AsyncCallback delegate uses the EndPing method to return the Result.

If PingEnabled is set to false in the connectionInfo parameter, a http/https request for the default index page will be done. Otherwise an ICMP packet will be used

Example

See pinger sample (C#) on how to use the Pinger methods.

See Also

Pinger Class | DeviceMgr Namespace | Ping device sample (C#) | The Asynchronous Pattern


Pinger.Cancel Method

Cancels asynchronous requests started with the BeginPing method.

[Visual Basic]
Public Sub Cancel( _
ByVal ar As IAsyncResult _
)
[C#]
public void Cancel(
IAsyncResult ar
);

Parameters

ar
The IAsyncResult handle returned by the corresponding Begin method.

Remarks

A Cancel call will not block and wait for the request to be canceled. Use asyncResult.AsyncWaitHandle.WaitOne(); or corresponding End method to wait for the request to be canceled or completed.

The returned values in the case of a subsequent corresponding End method depends on the timing of the Cancel call.

Note Canceling an ongoing request may produce an undefined result. For example, depending on the timing of the Cancel call, the request may have finished before the call could cancel it. Or in the case of an upgrade request, the firmware file may have been sent to the device, which will continue the upgrade even if the connection is disconnected by a cancel.

Example

See pinger sample (C#) on how to use the Pinger methods.

See Also

Pinger Class | DeviceMgr Namespace | Ping device sample (C#) | The Asynchronous Pattern


Pinger.EndPing Method

Waits for BeginPing to end and returns the Result.

[Visual Basic]
Public Function EndPing( _
ByVal ar As IAsyncResult _
) As Result
[C#]
public Result EndPing(
IAsyncResult ar
);

Parameters

ar
The IAsyncResult handle returned by the corresponding Begin method.

Example

See pinger sample (C#) on how to use the Pinger methods.

See Also

Pinger Class | DeviceMgr Namespace | Ping device sample (C#) | The Asynchronous Pattern


Pinger.Ping Method

Decides if an address is used or not.

[Visual Basic]
Public Function Ping( _
ByVal connectionInfo As ConnectionInfo _
) As Boolean
[C#]
public bool Ping(
ConnectionInfo connectionInfo
);

Parameters

connectionInfo
The connection info used when accessing the device.

Return Value

true if ping was replied; otherwise false.

Remarks

If PingEnabled is set to false in the connectionInfo parameter, a http/https request for the default index page will be done. Otherwise an ICMP packet will be used

Example

See pinger sample (C#) on how to use the Pinger methods.

See Also

Pinger Class | DeviceMgr Namespace | Ping device sample (C#)


Pinger Events

The events of the Pinger class are listed below. For a complete list of Pinger class members, see the Pinger Members topic.

Public Instance Events

ProgressUpdate Progress event during a BeginPing and Ping request.

See Also

Pinger Class | DeviceMgr Namespace | Ping device sample (C#) | The Asynchronous Pattern


Pinger.ProgressUpdate Event

Progress event during a BeginPing and Ping request.

[Visual Basic]
Public Event ProgressUpdate As ProgressEventHandler
[C#]
public event ProgressEventHandler ProgressUpdate;

Event Data

The event handler receives an argument of type ProgressEventArgs containing data related to this event. The following ProgressEventArgs properties provide information specific to this event.

Property | Description
AsyncState | Gets an object containing information about the ProgressEventArgs.
Progress | Gets the progress percent.

Example

See pinger sample (C#) on how to use the Pinger methods.

See Also

Pinger Class | DeviceMgr Namespace | Ping device sample (C#)


Product Class

A product (e.g. AXIS 211) with compatible software returned by Update.

For a list of all members of this type, see Product Members.

System.Object
DeviceMgr.Product

[Visual Basic]
Public Class Product
[C#]
public class Product

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

Software belonging to a specific Product can be downloaded from Axis web site. A Product can contain one or more Software, but instead of iterating through them, GetLatestVersion returns the latest Software.

Note It is advisable to download and upgrade all devices to the latest firmware version.

This class is part of a group of related classes used to query www.axis.com for available firmware updates.

The BeginGetAvailableSoftware method in the Update class is used to check for available firmware updates at www.axis.com and returns AvailableSoftware objects. AvailableSoftware contains a ProductList, which contains the list of available Product updates. Each Product has a name like e.g. "AXIS 211" and contains a SoftwareList, which is a list of available software (i.e. firmware files) for that product model. Each Software has a SoftwareVersion, e.g. 4.40.

With an AvailableSoftware object returned from the Update class it is possible to get the list of available firmware files (Software objects). These Software objects are then specified when downloading available software using the BeginDownload method in the Update class.

Example

See update sample (C#) on how to use the methods.

Requirements

Namespace: DeviceMgr

Assembly: DeviceMgr (in DeviceMgr.dll)

See Also

Product Members | DeviceMgr Namespace | Update | ProductList | Update sample (C#)


Product Members

Product overview

Public Instance Properties

Name | Gets the product name.
ProductType | Gets the product type.
SoftwareList | Gets the software compatible with this Product.

Public Instance Methods

GetLatestVersion Gets the latest Software version from SoftwareList.

See Also

Product Class | DeviceMgr Namespace | Update | ProductList | Update sample (C#)


Product Properties

The properties of the Product class are listed below. For a complete list of Product class members, see the Product Members topic.

Public Instance Properties

Name | Gets the product name.
ProductType | Gets the product type.
SoftwareList | Gets the software compatible with this Product.

See Also

Product Class | DeviceMgr Namespace | Update | ProductList | Update sample (C#)


Name Property

AXIS Camera Management SDK 2.00

Product.Name Property

Gets the product name.

[Visual Basic]
Public ReadOnly Property Name As String
[C#]
public string Name {get;}

Property Value

The name of the product, e.g. AXIS 221.

Example

See update sample (C#) on how to use the methods.

See Also

Product Class | DeviceMgr Namespace | Update | ProductList | Update sample (C#)


ProductType Property

AXIS Camera Management SDK 2.00

Product.ProductType Property

Gets the product type.

[Visual Basic]
Public ReadOnly Property ProductType As String
[C#]
public string ProductType {get;}

Property Value

The product type, i.e. CameraServer.

Example

See update sample (C#) on how to use the methods.

See Also

Product Class | DeviceMgr Namespace | Update | ProductList | Update sample (C#)


SoftwareList Property

AXIS Camera Management SDK 2.00

Product.SoftwareList Property

Gets the software compatible with this Product.

[Visual Basic]
Public ReadOnly Property SoftwareList As SoftwareList
[C#]
public SoftwareList SoftwareList {get;}

Property Value

The list of compatible Software.

Example

See update sample (C#) on how to use the methods.

See Also

Product Class | DeviceMgr Namespace | Update | ProductList | Update sample (C#)


Product Methods

The methods of the Product class are listed below. For a complete list of Product class members, see the Product Members topic.

Public Instance Methods

GetLatestVersion Gets the latest Software version from SoftwareList.

See Also

Product Class | DeviceMgr Namespace | Update | ProductList | Update sample (C#)


Product.GetLatestVersion Method

Gets the latest Software version from SoftwareList.

[Visual Basic]
Public Function GetLatestVersion() As Software
[C#]
public Software GetLatestVersion();

Return Value

The latest Software version if there exists compatible Software; otherwise null.

Example

See update sample (C#) on how to use the methods.

See Also

Product Class | DeviceMgr Namespace | Update | ProductList | Update sample (C#)


ProductList Class

A list of Product(s) with compatible software.

For a list of all members of this type, see ProductList Members.

System.Object
DeviceMgr.ProductList

[Visual Basic]
Public Class ProductList
Implements IEnumerable
[C#]
public class ProductList : IEnumerable

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

This class is part of a group of related classes used to query www.axis.com for available firmware updates.

The BeginGetAvailableSoftware method in the Update class is used to check for available firmware updates at www.axis.com and returns AvailableSoftware objects. AvailableSoftware contains a ProductList, which contains the list of available Product updates. Each Product has a name like e.g. "AXIS 211" and contains a SoftwareList, which is a list of available software (i.e. firmware files) for that product model. Each Software has a SoftwareVersion, e.g. 4.40.

With an AvailableSoftware object returned from the Update class it is possible to get the list of available firmware files (Software objects). These Software objects are then specified when downloading available software using the BeginDownload method in the Update class.

Example

See update sample (C#) on how to use the methods.

Requirements

Namespace: DeviceMgr

Assembly: DeviceMgr (in DeviceMgr.dll)

See Also

ProductList Members | DeviceMgr Namespace | Update | Product | Update sample (C#)


ProductList Members

ProductList overview

Public Instance Properties

Count | Gets the count of Product(s) in the list.
Item | Overloaded. Gets the Product at the specified indexed location in the list.

Public Instance Methods

GetEnumerator Returns an enumerator that iterates through the Product(s).

See Also

ProductList Class | DeviceMgr Namespace | Update | Product | Update sample (C#)


ProductList Properties

The properties of the ProductList class are listed below. For a complete list of ProductList class members, see the ProductList Members topic.

Public Instance Properties

Count | Gets the count of Product(s) in the list.
Item | Overloaded. Gets the Product at the specified indexed location in the list.

See Also

ProductList Class | DeviceMgr Namespace | Update | Product | Update sample (C#)


Count Property

AXIS Camera Management SDK 2.00

ProductList.Count Property

Gets the count of Product(s) in the list.

[Visual Basic]
Public ReadOnly Property Count As Integer
[C#]
public int Count {get;}

Property Value

The number of Product(s) actually contained in the ProductList.

Example

See update sample (C#) on how to use the methods.

See Also

ProductList Class | DeviceMgr Namespace | Update | Product | Update sample (C#)


Item Property

AXIS Camera Management SDK 2.00

ProductList.Item Property

Gets the Product at the specified indexed location in the list.

Overload List

Gets the Product at the specified indexed location in the list.

public Product this[int] {get;}

Gets the Product with a specified name in the list.

public Product this[string] {get;}

See Also

ProductList Class | DeviceMgr Namespace | Update | Product | Update sample (C#)


Item Property (Int32)

AXIS Camera Management SDK 2.00

ProductList.Item Property (Int32)

Gets the Product at the specified indexed location in the list.

[Visual Basic]
Overloads Public Default ReadOnly Property Item( _
ByVal index As Integer _
) As Product
[C#]
public Product this[
int index
] {get;}

Parameters

index
The indexed location of the Product in the list.

Property Value

The Product at the specified indexed location in the list.

Example

See update sample (C#) on how to use the methods.

See Also

ProductList Class | DeviceMgr Namespace | ProductList.Item Overload List | Update | Product | Update sample (C#)


Item Property (String)

AXIS Camera Management SDK 2.00

ProductList.Item Property (String)

Gets the Product with a specified name in the list.

[Visual Basic]
Overloads Public Default ReadOnly Property Item( _
ByVal name As String _
) As Product
[C#]
public Product this[
string name
] {get;}

Parameters

name
The name, e.g. AXIS 221, of the Product in the list.

Property Value

The Product with a specified name in the list.

Example

See update sample (C#) on how to use the methods.

See Also

ProductList Class | DeviceMgr Namespace | ProductList.Item Overload List | Update | Product | Update sample (C#)


ProductList Methods

The methods of the ProductList class are listed below. For a complete list of ProductList class members, see the ProductList Members topic.

Public Instance Methods

GetEnumerator Returns an enumerator that iterates through the Product(s).

See Also

ProductList Class | DeviceMgr Namespace | Update | Product | Update sample (C#)


ProductList.GetEnumerator Method

Returns an enumerator that iterates through the Product(s).

[Visual Basic]
NotOverridable Public Function GetEnumerator() As IEnumerator _
Implements IEnumerable.GetEnumerator
[C#]
public IEnumerator GetEnumerator();

Return Value

An IEnumerator for the ProductList instance.

Implements

IEnumerable.GetEnumerator

Example

See update sample (C#) on how to use the methods.

See Also

ProductList Class | DeviceMgr Namespace | Update | Product | Update sample (C#)


ProgressEventArgs Class

Provides data for ProgressEventHandler events sent by operations.

For a list of all members of this type, see ProgressEventArgs Members.

System.Object
System.EventArgs
DeviceMgr.ProgressEventArgs

[Visual Basic]
Public Class ProgressEventArgs
Inherits EventArgs
[C#]
public class ProgressEventArgs : EventArgs

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

The ProgressUpdate event occurs every 0.5 seconds while functions run. A ProgressEventArgs specifies the progress as a value between 0 and 100, and a state object describing it further.

Example

See upgrade sample (C#) and upgrade sample (C++) on how to use ProgressEventArgs.

Requirements

Namespace: DeviceMgr

Assembly: DeviceMgr (in DeviceMgr.dll)

See Also

ProgressEventArgs Members | DeviceMgr Namespace | ProgressEventHandler


ProgressEventArgs Members

ProgressEventArgs overview

Public Instance Constructors

ProgressEventArgs Constructor Initializes a new instance of the ProgressEventArgs class with the progress and state.

Public Instance Properties

AsyncState | Gets an object containing information about the ProgressEventArgs.
Progress | Gets the progress percent.

See Also

ProgressEventArgs Class | DeviceMgr Namespace | ProgressEventHandler


ProgressEventArgs Constructor

Initializes a new instance of the ProgressEventArgs class with the progress and state.

[Visual Basic]
Public Sub New( _
ByVal progress As Integer, _
ByVal state As Object _
)
[C#]
public ProgressEventArgs(
int progress,
object state
);

Parameters

progress
The progress percent.
state
A user provided object that is passed to the method invoked when the asynchronous operation completes or in the result and can e.g. contain user state information.

Example

See upgrade sample (C#) and upgrade sample (C++) on how to use ProgressEventArgs.

See Also

ProgressEventArgs Class | DeviceMgr Namespace | ProgressEventHandler


ProgressEventArgs Properties

The properties of the ProgressEventArgs class are listed below. For a complete list of ProgressEventArgs class members, see the ProgressEventArgs Members topic.

Public Instance Properties

AsyncState | Gets an object containing information about the ProgressEventArgs.
Progress | Gets the progress percent.

See Also

ProgressEventArgs Class | DeviceMgr Namespace | ProgressEventHandler


AsyncState Property

AXIS Camera Management SDK 2.00

ProgressEventArgs.AsyncState Property

Gets an object containing information about the ProgressEventArgs.

[Visual Basic]
Public ReadOnly Property AsyncState As Object
[C#]
public object AsyncState {get;}

Property Value

An object containing information about the ProgressEventArgs.

Example

See upgrade sample (C#) and upgrade sample (C++) on how to use ProgressEventArgs.

See Also

ProgressEventArgs Class | DeviceMgr Namespace | ProgressEventHandler


Progress Property

AXIS Camera Management SDK 2.00

ProgressEventArgs.Progress Property

Gets the progress percent.

[Visual Basic]
Public ReadOnly Property Progress As Integer
[C#]
public int Progress {get;}

Property Value

The function progress as integer between 0 and 100.

Example

See upgrade sample (C#) and upgrade sample (C++) on how to use ProgressEventArgs.

See Also

ProgressEventArgs Class | DeviceMgr Namespace | ProgressEventHandler


ProgressEventHandler Delegate

Represents the method that will handle the ProgressUpdate event of a function or Operation.

[Visual Basic]
Public Delegate Sub ProgressEventHandler( _
ByVal sender As Object, _
ByVal e As ProgressEventArgs _
)
[C#]
public delegate void ProgressEventHandler(
object sender,
ProgressEventArgs e
);

Parameters

sender
The source of the event.
e
An ProgressEventArgs that contains the event data.

Remarks

All network related functions have the feature to report progress while running. When you create a ProgressEventHandler delegate, you identify the method that will handle the event. To associate the event with your event handler, add an instance of the delegate to the event. The event handler is called whenever the event occurs, unless you remove the delegate.

Requirements

Namespace: DeviceMgr

Assembly: DeviceMgr (in DeviceMgr.dll)

See Also

DeviceMgr Namespace | ProgressEventArgs


Protocol Enumeration

Protocol used when communicating with device.

[Visual Basic]
Public Enum Protocol
[C#]
public enum Protocol

Members

Member Name | Description
Http | HyperText Transfer Protocol. Standard protocol for transmitting Web pages on the Internet.
Https | HTTP Over SSL. Protocol enabling the secured transmission of Web pages.

Requirements

Namespace: DeviceMgr

Assembly: DeviceMgr (in DeviceMgr.dll)

See Also

DeviceMgr Namespace | ConnectionInfo


PtzRight Enumeration

Access rights if a user is allowed to control a connected PTZ device.

[Visual Basic]
Public Enum PtzRight
[C#]
public enum PtzRight

Remarks

Note PTZ control is device dependent, and devices not supporting PTZ will ignore this parameter.

Example

See user management samples (C#) on how to employ the User Management methods.

Members

Member Name | Description
NoPtz | User has no control of connected PTZ devices.
Ptz | User has control of connected PTZ devices.

Requirements

Namespace: DeviceMgr

Assembly: DeviceMgr (in DeviceMgr.dll)

See Also

DeviceMgr Namespace | UserManagement | User Management samples (C#)


Result Class

Describing the status of a completed function or Operation.

For a list of all members of this type, see Result Members.

System.Object
DeviceMgr.Result

[Visual Basic]
Public Class Result
[C#]
public class Result

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

Most functions return a Result after completing. A Result is a bundle of data regarding the function from which, depending on the function, various amount of data can be extracted. Data available for all functions are:

  • ConnectionInfo, describes the targeted device.
  • Name, the ResultName of the function.
  • Status, the final function ResultStatus.
A Result can also contain other Results in the SubResultList. E.g. Template.EndApplyTemplate generates a Result where every template line is represented as a sub Result in SubResultList.

Requirements

Namespace: DeviceMgr

Assembly: DeviceMgr (in DeviceMgr.dll)

See Also

Result Members | DeviceMgr Namespace | ResultList


Result Members

Result overview

Public Instance Properties

AsyncState | The user provided state object in the function or operation.
ConnectionInfo | Gets the ConnectionInfo used when accessing a device.
ErrorMessage | Gets the error message describing the cause of a failure.
Name | Gets the name of the function the Result is originating from.
ParameterList | Gets the parameter list containing function settings and parameters.
Status | Gets the ResultStatus of the function.
SubResultList | Gets the sub results from the Result.

Public Instance Methods

ToString Converts the value of this instance to a String describing the Result.

See Also

Result Class | DeviceMgr Namespace | ResultList


Result Properties

The properties of the Result class are listed below. For a complete list of Result class members, see the Result Members topic.

Public Instance Properties

AsyncState | The user provided state object in the function or operation.
ConnectionInfo | Gets the ConnectionInfo used when accessing a device.
ErrorMessage | Gets the error message describing the cause of a failure.
Name | Gets the name of the function the Result is originating from.
ParameterList | Gets the parameter list containing function settings and parameters.
Status | Gets the ResultStatus of the function.
SubResultList | Gets the sub results from the Result.

See Also

Result Class | DeviceMgr Namespace | ResultList


AsyncState Property

AXIS Camera Management SDK 2.00

Result.AsyncState Property

The user provided state object in the function or operation.

[Visual Basic]
Public ReadOnly Property AsyncState As Object
[C#]
public object AsyncState {get;}

Property Value

The user provided state object in the function or operation.

See Also

Result Class | DeviceMgr Namespace | ResultList


ConnectionInfo Property

AXIS Camera Management SDK 2.00

Result.ConnectionInfo Property

Gets the ConnectionInfo used when accessing a device.

[Visual Basic]
Public ReadOnly Property ConnectionInfo As ConnectionInfo
[C#]
public ConnectionInfo ConnectionInfo {get;}

Property Value

The connection info used when accessing the device.

See Also

Result Class | DeviceMgr Namespace | ResultList


ErrorMessage Property

AXIS Camera Management SDK 2.00

Result.ErrorMessage Property

Gets the error message describing the cause of a failure.

[Visual Basic]
Public ReadOnly Property ErrorMessage As String
[C#]
public string ErrorMessage {get;}

Property Value

An error message if function failed; otherwise null.

See Also

Result Class | DeviceMgr Namespace | ResultList


Name Property

AXIS Camera Management SDK 2.00

Result.Name Property

Gets the name of the function the Result is originating from.

[Visual Basic]
Public ReadOnly Property Name As String
[C#]
public string Name {get;}

Property Value

The function name. All function names are specified in ResultName.

Remarks

A template may contain various functions, and a way to know what function a Result is originating from is by reading its Name.

See Also

Result Class | DeviceMgr Namespace | ResultName | ResultList


ParameterList Property

AXIS Camera Management SDK 2.00

Result.ParameterList Property

Gets the parameter list containing function settings and parameters.

[Visual Basic]
Public ReadOnly Property ParameterList As ParameterList
[C#]
public ParameterList ParameterList {get;}

Property Value

Parameters describing the function, e.g. if Maintenance.EndFactoryDefault performed a normal or hard factory default.

See Also

Result Class | DeviceMgr Namespace | ResultList


Status Property

AXIS Camera Management SDK 2.00

Result.Status Property

Gets the ResultStatus of the function.

[Visual Basic]
Public ReadOnly Property Status As ResultStatus
[C#]
public ResultStatus Status {get;}

Property Value

The final function result.

See Also

Result Class | DeviceMgr Namespace | ResultList


SubResultList Property

AXIS Camera Management SDK 2.00

Result.SubResultList Property

Gets the sub results from the Result.

[Visual Basic]
Public ReadOnly Property SubResultList As ResultList
[C#]
public ResultList SubResultList {get;}

Property Value

The sub results of the Result.

Remarks

A Result may contain several sub results describing it further, e.g. Upgrade is a function containing two separate sub functions:

  1. upgrade device
  2. attempt to reconnect to device and read new firmware version
These two steps are listed in the SubResultList as results with individual parameters (e.g. Status and Name). Instead of iterating through the sub results for e.g. the new firmware version, static functions like Upgrade.GetFirmwareVersion performs the task.

See Also

Result Class | DeviceMgr Namespace | ResultList


Result Methods

The methods of the Result class are listed below. For a complete list of Result class members, see the Result Members topic.

Public Instance Methods

ToString Converts the value of this instance to a String describing the Result.

See Also

Result Class | DeviceMgr Namespace | ResultList


Result.ToString Method

Converts the value of this instance to a String describing the Result.

[Visual Basic]
Overrides Public Function ToString() As String
[C#]
public override string ToString();

Return Value

A String whose value represents the Result.

See Also

Result Class | DeviceMgr Namespace | ResultList


ResultList Class

A list of Result(s).

For a list of all members of this type, see ResultList Members.

System.Object
DeviceMgr.ResultList

[Visual Basic]
Public Class ResultList
Implements IEnumerable
[C#]
public class ResultList : IEnumerable

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: DeviceMgr

Assembly: DeviceMgr (in DeviceMgr.dll)

See Also

ResultList Members | DeviceMgr Namespace | Result


ResultList Members

ResultList overview

Public Instance Properties

Count | Gets the count of Result(s) in the list.
Item | Gets the Result at the specified indexed location in the list.

Public Instance Methods

GetEnumerator | Returns an enumerator that iterates through the Result(s).
ToString | Converts the value of this instance to a String containing the Results in the ResultList.

See Also

ResultList Class | DeviceMgr Namespace | Result


ResultList Properties

The properties of the ResultList class are listed below. For a complete list of ResultList class members, see the ResultList Members topic.

Public Instance Properties

Count | Gets the count of Result(s) in the list.
Item | Gets the Result at the specified indexed location in the list.

See Also

ResultList Class | DeviceMgr Namespace | Result


Count Property

AXIS Camera Management SDK 2.00

ResultList.Count Property

Gets the count of Result(s) in the list.

[Visual Basic]
Public ReadOnly Property Count As Integer
[C#]
public int Count {get;}

Property Value

The number of Result(s) actually contained in the ResultList.

See Also

ResultList Class | DeviceMgr Namespace | Result


Item Property

AXIS Camera Management SDK 2.00

ResultList.Item Property

Gets the Result at the specified indexed location in the list.

[Visual Basic]
Public Default ReadOnly Property Item( _
ByVal index As Integer _
) As Result
[C#]
public Result this[
int index
] {get;}

Parameters

index
The indexed location of the Result in the list.

Property Value

The Result at the specified indexed location in the list.

See Also

ResultList Class | DeviceMgr Namespace | Result


ResultList Methods

The methods of the ResultList class are listed below. For a complete list of ResultList class members, see the ResultList Members topic.

Public Instance Methods

GetEnumerator | Returns an enumerator that iterates through the Result(s).
ToString | Converts the value of this instance to a String containing the Results in the ResultList.

See Also

ResultList Class | DeviceMgr Namespace | Result


ResultList.GetEnumerator Method

Returns an enumerator that iterates through the Result(s).

[Visual Basic]
NotOverridable Public Function GetEnumerator() As IEnumerator _
Implements IEnumerable.GetEnumerator
[C#]
public IEnumerator GetEnumerator();

Return Value

An IEnumerator for the ResultList instance.

Implements

IEnumerable.GetEnumerator

See Also

ResultList Class | DeviceMgr Namespace | Result


ResultList.ToString Method

Converts the value of this instance to a String containing the Results in the ResultList.

[Visual Basic]
Overrides Public Function ToString() As String
[C#]
public override string ToString();

Return Value

A String whose value represents the Result(s) in the ResultList.

See Also

ResultList Class | DeviceMgr Namespace | Result


ResultName Class

Listing possible Result.Name(s).

For a list of all members of this type, see ResultName Members.

System.Object
DeviceMgr.ResultName

[Visual Basic]
Public Class ResultName
[C#]
public class ResultName

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

A way to know what function a Result is originating from is by reading its Result.Name property. By knowing the originating function, it is possible to process the Result and extract relevant data.

Requirements

Namespace: DeviceMgr

Assembly: DeviceMgr (in DeviceMgr.dll)

See Also

ResultName Members | DeviceMgr Namespace | Result


ResultName Members

ResultName overview

Public Static (Shared) Properties

AssignIP | Gets the Name of a Result after using AssignIP.
Config_Get | Gets the Name of a Result after using Config.Get or Config.BeginGet.
Config_Set | Gets the Name of a Result after using Config.Set or Config.BeginSet.
DateTime | Gets the Name of a Result after using Config.SetDateTime or Config.BeginSetDateTime.
Discover_Address | Gets the Name of a Result after using Discover.BeginSearchAddress.
Discover_Local | Gets the Name of a Result after using Discover.BeginSearchLocal.
Discover_Range | Gets the Name of a Result after using Discover.BeginSearchRange.
FactoryDefault | Gets the Name of a Result after using Maintenance.FactoryDefault or Maintenance.BeginFactoryDefault.
Imaging | Gets the Name of a Result after using Imaging.
Reconnect | Gets the Name of a Result after using functions trying to reconnect to a device, e.g. Upgrade.
Restart | Gets the Name of a Result after using Maintenance.Restart or Maintenance.BeginRestart.
Template | Gets the Name of a Result after using Template.
Update_Download | Gets the Name of a Result after using Update.Download or Update.BeginDownload.
Update_Update | Gets the Name of a Result after using Update.GetAvailableSoftware or Update.BeginGetAvailableSoftware.
Upgrade | Gets the Name of a Result after using Upgrade.
UserManagement_Get | Gets the Name of a Result after using UserManagement.BeginGetUsers.
UserManagement_Remove | Gets the Name of a Result after using UserManagement.BeginRemoveUser.
UserManagement_Set | Gets the Name of a Result after using UserManagement.BeginSetUser.
Wait | Gets the Name of a Result in the Result.SubResultList after using functions where reconnect is not possible, e.g. AssignIP.EnableDHCP.

See Also

ResultName Class | DeviceMgr Namespace | Result


ResultName Properties

The properties of the ResultName class are listed below. For a complete list of ResultName class members, see the ResultName Members topic.

Public Static (Shared) Properties

AssignIP | Gets the Name of a Result after using AssignIP.
Config_Get | Gets the Name of a Result after using Config.Get or Config.BeginGet.
Config_Set | Gets the Name of a Result after using Config.Set or Config.BeginSet.
DateTime | Gets the Name of a Result after using Config.SetDateTime or Config.BeginSetDateTime.
Discover_Address | Gets the Name of a Result after using Discover.BeginSearchAddress.
Discover_Local | Gets the Name of a Result after using Discover.BeginSearchLocal.
Discover_Range | Gets the Name of a Result after using Discover.BeginSearchRange.
FactoryDefault | Gets the Name of a Result after using Maintenance.FactoryDefault or Maintenance.BeginFactoryDefault.
Imaging | Gets the Name of a Result after using Imaging.
Reconnect | Gets the Name of a Result after using functions trying to reconnect to a device, e.g. Upgrade.
Restart | Gets the Name of a Result after using Maintenance.Restart or Maintenance.BeginRestart.
Template | Gets the Name of a Result after using Template.
Update_Download | Gets the Name of a Result after using Update.Download or Update.BeginDownload.
Update_Update | Gets the Name of a Result after using Update.GetAvailableSoftware or Update.BeginGetAvailableSoftware.
Upgrade | Gets the Name of a Result after using Upgrade.
UserManagement_Get | Gets the Name of a Result after using UserManagement.BeginGetUsers.
UserManagement_Remove | Gets the Name of a Result after using UserManagement.BeginRemoveUser.
UserManagement_Set | Gets the Name of a Result after using UserManagement.BeginSetUser.
Wait | Gets the Name of a Result in the Result.SubResultList after using functions where reconnect is not possible, e.g. AssignIP.EnableDHCP.

See Also

ResultName Class | DeviceMgr Namespace | Result


AssignIP Property

AXIS Camera Management SDK 2.00

ResultName.AssignIP Property

Gets the Name of a Result after using AssignIP.

[Visual Basic]
Public Shared ReadOnly Property AssignIP As String
[C#]
public static string AssignIP {get;}

Property Value

The name of the Result when assigning IP addresses and enabling DHCP.

Example

See assign IP samples (C#) on how to use the AssignIP methods.

See Also

ResultName Class | DeviceMgr Namespace | Result | Assign IP samples (C#)


Config_Get Property

AXIS Camera Management SDK 2.00

ResultName.Config_Get Property

Gets the Name of a Result after using Config.Get or Config.BeginGet.

[Visual Basic]
Public Shared ReadOnly Property Config_Get As String
[C#]
public static string Config_Get {get;}

Property Value

The name of the Result when getting parameters.

Example

See config sample (C#) on how to get parameters using the Config methods.

See Also

ResultName Class | DeviceMgr Namespace | Result | Get parameters sample (C#)


Config_Set Property

AXIS Camera Management SDK 2.00

ResultName.Config_Set Property

Gets the Name of a Result after using Config.Set or Config.BeginSet.

[Visual Basic]
Public Shared ReadOnly Property Config_Set As String
[C#]
public static string Config_Set {get;}

Property Value

The name of the Result when setting parameters.

Example

See config sample (C#) on how to set parameters using the Config methods.

See Also

ResultName Class | DeviceMgr Namespace | Result | Set parameters sample (C#)


DateTime Property

AXIS Camera Management SDK 2.00

ResultName.DateTime Property

Gets the Name of a Result after using Config.SetDateTime or Config.BeginSetDateTime.

[Visual Basic]
Public Shared ReadOnly Property DateTime As String
[C#]
public static string DateTime {get;}

Property Value

The name of the Result when setting date and time.

Example

See config sample (C#) on how to set date and time using the Config methods.

See Also

ResultName Class | DeviceMgr Namespace | Result | Set date and time sample (C#)


Discover_Address Property

AXIS Camera Management SDK 2.00

ResultName.Discover_Address Property

Gets the Name of a Result after using Discover.BeginSearchAddress.

[Visual Basic]
Public Shared ReadOnly Property Discover_Address As String
[C#]
public static string Discover_Address {get;}

Property Value

The name of the Result when searching a specific address.

Example

See discover sample (C#), synchronous discover sample (C++) and asynchronous discover sample (C++) on how to search an address using the Discover methods.

See Also

ResultName Class | DeviceMgr Namespace | Result | Discover address sample (C#)


Discover_Local Property

AXIS Camera Management SDK 2.00

ResultName.Discover_Local Property

Gets the Name of a Result after using Discover.BeginSearchLocal.

[Visual Basic]
Public Shared ReadOnly Property Discover_Local As String
[C#]
public static string Discover_Local {get;}

Property Value

The name of the Result when searching the local network.

Example

See discover sample (C#), synchronous discover sample (C++) and asynchronous discover sample (C++) on how to search the local network using the Discover methods.

See Also

ResultName Class | DeviceMgr Namespace | Result | Discover on local network sample (C#)


Discover_Range Property

AXIS Camera Management SDK 2.00

ResultName.Discover_Range Property

Gets the Name of a Result after using Discover.BeginSearchRange.

[Visual Basic]
Public Shared ReadOnly Property Discover_Range As String
[C#]
public static string Discover_Range {get;}

Property Value

The name of the Result when searching an IP range.

Example

See discover sample (C#), synchronous discover sample (C++) and asynchronous discover sample (C++) on how to search a specified IP range using the Discover methods.

See Also

ResultName Class | DeviceMgr Namespace | Result | Discover IP range sample (C#)


FactoryDefault Property

AXIS Camera Management SDK 2.00

ResultName.FactoryDefault Property

Gets the Name of a Result after using Maintenance.FactoryDefault or Maintenance.BeginFactoryDefault.

[Visual Basic]
Public Shared ReadOnly Property FactoryDefault As String
[C#]
public static string FactoryDefault {get;}

Property Value

The name of the Result when setting factory default.

Example

See maintenance sample (C#) on how to reset factory default using the Maintenance methods.

See Also

ResultName Class | DeviceMgr Namespace | Result | Factory default sample (C#)


Imaging Property

AXIS Camera Management SDK 2.00

ResultName.Imaging Property

Gets the Name of a Result after using Imaging.

[Visual Basic]
Public Shared ReadOnly Property Imaging As String
[C#]
public static string Imaging {get;}

Property Value

The name of the Result when getting images.

Example

See imaging sample (C#) on how to use the Imaging methods.

See Also

ResultName Class | DeviceMgr Namespace | Result | Get image sample (C#)


Reconnect Property

AXIS Camera Management SDK 2.00

ResultName.Reconnect Property

Gets the Name of a Result after using functions trying to reconnect to a device, e.g. Upgrade.

[Visual Basic]
Public Shared ReadOnly Property Reconnect As String
[C#]
public static string Reconnect {get;}

Property Value

The name of the Result when reconnecting.

Example

See upgrade sample (C#) and upgrade sample (C++) on how to use the Upgrade methods.

See Also

ResultName Class | DeviceMgr Namespace | Result | Upgrade sample (C#)


Restart Property

AXIS Camera Management SDK 2.00

ResultName.Restart Property

Gets the Name of a Result after using Maintenance.Restart or Maintenance.BeginRestart.

[Visual Basic]
Public Shared ReadOnly Property Restart As String
[C#]
public static string Restart {get;}

Property Value

The name of the Result when restarting.

Example

See maintenance sample (C#) on how to restart a device using the Maintenance methods.

See Also

ResultName Class | DeviceMgr Namespace | Result | Restart sample (C#)


Template Property

AXIS Camera Management SDK 2.00

ResultName.Template Property

Gets the Name of a Result after using Template.

[Visual Basic]
Public Shared ReadOnly Property Template As String
[C#]
public static string Template {get;}

Property Value

The name of the Result when applying a template.

Example

See template sample (C#) or template sample (C++) on how to use the Template methods.

See Also

ResultName Class | DeviceMgr Namespace | Result | Apply template sample (C#)


Update_Download Property

AXIS Camera Management SDK 2.00

ResultName.Update_Download Property

Gets the Name of a Result after using Update.Download or Update.BeginDownload.

[Visual Basic]
Public Shared ReadOnly Property Update_Download As String
[C#]
public static string Update_Download {get;}

Property Value

The name of the Result when downloading software.

Example

See update sample (C#) on how to use the methods.

See Also

ResultName Class | DeviceMgr Namespace | Result | Update sample (C#)


Update_Update Property

AXIS Camera Management SDK 2.00

ResultName.Update_Update Property

Gets the Name of a Result after using Update.GetAvailableSoftware or Update.BeginGetAvailableSoftware.

[Visual Basic]
Public Shared ReadOnly Property Update_Update As String
[C#]
public static string Update_Update {get;}

Property Value

The name of the Result when updating available software from Axis web.

Example

See update sample (C#) on how to use the methods.

See Also

ResultName Class | DeviceMgr Namespace | Result | Update sample (C#)


Upgrade Property

AXIS Camera Management SDK 2.00

ResultName.Upgrade Property

Gets the Name of a Result after using Upgrade.

[Visual Basic]
Public Shared ReadOnly Property Upgrade As String
[C#]
public static string Upgrade {get;}

Property Value

The name of the Result when upgrading.

Example

See upgrade sample (C#) and upgrade sample (C++) on how to use the Upgrade methods.

See Also

ResultName Class | DeviceMgr Namespace | Result | Upgrade sample (C#)


UserManagement_Get Property

AXIS Camera Management SDK 2.00

ResultName.UserManagement_Get Property

Gets the Name of a Result after using UserManagement.BeginGetUsers.

[Visual Basic]
Public Shared ReadOnly Property UserManagement_Get As String
[C#]
public static string UserManagement_Get {get;}

Property Value

The name of the Result when getting users.

Example

See user management sample (C#) on how to get users using the User Management methods.

See Also

ResultName Class | DeviceMgr Namespace | Result | Get users sample (C#)


UserManagement_Remove Property

AXIS Camera Management SDK 2.00

ResultName.UserManagement_Remove Property

Gets the Name of a Result after using UserManagement.BeginRemoveUser.

[Visual Basic]
Public Shared ReadOnly Property UserManagement_Remove As String
[C#]
public static string UserManagement_Remove {get;}

Property Value

The name of the Result when removing a user.

Example

See user management sample (C#) on how to remove a user using the User Management methods.

See Also

ResultName Class | DeviceMgr Namespace | Result | Remove user sample (C#)


UserManagement_Set Property

AXIS Camera Management SDK 2.00

ResultName.UserManagement_Set Property

Gets the Name of a Result after using UserManagement.BeginSetUser.

[Visual Basic]
Public Shared ReadOnly Property UserManagement_Set As String
[C#]
public static string UserManagement_Set {get;}

Property Value

The name of the Result when setting a user.

Example

See user management sample (C#) on how to set a user using the User Management methods.

See Also

ResultName Class | DeviceMgr Namespace | Result | Set user sample (C#)


Wait Property

AXIS Camera Management SDK 2.00

ResultName.Wait Property

Gets the Name of a Result in the Result.SubResultList after using functions where reconnect is not possible, e.g. AssignIP.EnableDHCP.

[Visual Basic]
Public Shared ReadOnly Property Wait As String
[C#]
public static string Wait {get;}

Property Value

The name of the Result when waiting.

Example

See assign IP sample (C#) on how to enable DHCP on devices using the AssignIP methods.

See Also

ResultName Class | DeviceMgr Namespace | Result | Enable DHCP sample (C#)


ResultStatus Enumeration

Describing the final function Result status.

[Visual Basic]
Public Enum ResultStatus
[C#]
public enum ResultStatus

Members

Member Name | Description
OK | No problems have occurred, function was successful.
Error | Unknown error.
PasswordError | Unable to connect to Axis device using current credentials.
NoContact | Unable to contact Axis device.
UserCancelled | Ongoing function canceled by user.
CertificateError | Unable to communicate via HTTPS due to invalid certificate.
FirmwareError | Firmware is incompatible with device.
FileError | Error while reading from or writing to disk.
StoppedOnError | Function stopped since a previous device reported error. Only occurring in sequence operations and Stop On Error option was set.

Requirements

Namespace: DeviceMgr

Assembly: DeviceMgr (in DeviceMgr.dll)

See Also

DeviceMgr Namespace | Result


Settings Class

Contains methods for setting up the component environment.

For a list of all members of this type, see Settings Members.

System.Object
DeviceMgr.Settings

[Visual Basic]
Public Class Settings
[C#]
public class Settings

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: DeviceMgr

Assembly: DeviceMgr (in DeviceMgr.dll)

See Also

Settings Members | DeviceMgr Namespace


Settings Members

Settings overview

Public Static (Shared) Properties

EnableLinkLocalCommunication | Enables or disables communication with Axis devices on their link local (AutoIP) address (default value is true).
HttpConnectionTimeout | Gets or sets the time-span a request should wait before canceling (default value is 12000 ms).
MaxConcurrentHttpConnections | Gets or sets the number of concurrent HTTP and HTTPS connections (default value is 50).
MaxSearchRangePKS | Gets or sets the maximum number of transmitted packets per second during a Discover.BeginSearchRange (default value is 1000).
SearchRangeRepeat | Gets or sets the number of packages sent to each IP address within the range when performing a Discover.BeginSearchRange.

Public Static (Shared) Methods

DisableProxy | Disables the use of proxy for all HTTP and HTTPS communication (default value is UseIEProxySettings.
EnableDebugLog | Outputs log statements describing the component activity to screen, disk or other targets specified in the configuration file (default value is false).
SetCertificatePolicy | Setting the policy whether to allow communication with Axis devices even though they have invalid certificates (default value is to disallow invalid certificates).
UseIEProxySettings | Uses Internet Explorer's proxy settings for all HTTP and HTTPS communication (default value is UseIEProxySettings.
UseProxySettings | Uses a user-defined proxy for all HTTP and HTTPS communication (default value is UseIEProxySettings.

See Also

Settings Class | DeviceMgr Namespace


Settings Properties

The properties of the Settings class are listed below. For a complete list of Settings class members, see the Settings Members topic.

Public Static (Shared) Properties

EnableLinkLocalCommunication | Enables or disables communication with Axis devices on their link local (AutoIP) address (default value is true).
HttpConnectionTimeout | Gets or sets the time-span a request should wait before canceling (default value is 12000 ms).
MaxConcurrentHttpConnections | Gets or sets the number of concurrent HTTP and HTTPS connections (default value is 50).
MaxSearchRangePKS | Gets or sets the maximum number of transmitted packets per second during a Discover.BeginSearchRange (default value is 1000).
SearchRangeRepeat | Gets or sets the number of packages sent to each IP address within the range when performing a Discover.BeginSearchRange.

See Also

Settings Class | DeviceMgr Namespace


EnableLinkLocalCommunication Property

AXIS Camera Management SDK 2.00

Settings.EnableLinkLocalCommunication Property

Enables or disables communication with Axis devices on their link local (AutoIP) address (default value is true).

[Visual Basic]
Public Shared Property EnableLinkLocalCommunication As Boolean
[C#]
public static bool EnableLinkLocalCommunication {get; set;}

Remarks

If enabled and no other means to access a device exists other than using its link local address, a new IP address (in range 169.254.*) is added to the adapter. This requires computer administrator access rights.

See Also

Settings Class | DeviceMgr Namespace


HttpConnectionTimeout Property

AXIS Camera Management SDK 2.00

Settings.HttpConnectionTimeout Property

Gets or sets the time-span a request should wait before canceling (default value is 12000 ms).

[Visual Basic]
Public Shared Property HttpConnectionTimeout As Integer
[C#]
public static int HttpConnectionTimeout {get; set;}

Property Value

A time-span in milliseconds before canceling request. The minimum timeout is 12000 ms even if this value is set to a lower value. Setting the value to 0 means no connection timeout.

See Also

Settings Class | DeviceMgr Namespace


MaxConcurrentHttpConnections Property

AXIS Camera Management SDK 2.00

Settings.MaxConcurrentHttpConnections Property

Gets or sets the number of concurrent HTTP and HTTPS connections (default value is 50).

[Visual Basic]
Public Shared Property MaxConcurrentHttpConnections As Integer
[C#]
public static int MaxConcurrentHttpConnections {get; set;}

Property Value

A number of concurrent HTTP and HTTPS connections.

See Also

Settings Class | DeviceMgr Namespace


MaxSearchRangePKS Property

AXIS Camera Management SDK 2.00

Settings.MaxSearchRangePKS Property

Gets or sets the maximum number of transmitted packets per second during a Discover.BeginSearchRange (default value is 1000).

[Visual Basic]
Public Shared Property MaxSearchRangePKS As Integer
[C#]
public static int MaxSearchRangePKS {get; set;}

Property Value

A number of maximum transmitted packages per second, you may want to lower this number to reduce network load.

See Also

Settings Class | DeviceMgr Namespace | Discover


SearchRangeRepeat Property

AXIS Camera Management SDK 2.00

Settings.SearchRangeRepeat Property

Gets or sets the number of packages sent to each IP address within the range when performing a Discover.BeginSearchRange.

[Visual Basic]
Public Shared Property SearchRangeRepeat As Integer
[C#]
public static int SearchRangeRepeat {get; set;}

Property Value

A number of transmitted packages to each IP address within the range.

Remarks

On networks with no package loss the default value, one package per IP address, is preferred but heavy loaded networks may need multiple packages per IP address to make sure all devices within the range are discovered.

See Also

Settings Class | DeviceMgr Namespace | Discover


Settings Methods

The methods of the Settings class are listed below. For a complete list of Settings class members, see the Settings Members topic.

Public Static (Shared) Methods

DisableProxy | Disables the use of proxy for all HTTP and HTTPS communication (default value is UseIEProxySettings.
EnableDebugLog | Outputs log statements describing the component activity to screen, disk or other targets specified in the configuration file (default value is false).
SetCertificatePolicy | Setting the policy whether to allow communication with Axis devices even though they have invalid certificates (default value is to disallow invalid certificates).
UseIEProxySettings | Uses Internet Explorer's proxy settings for all HTTP and HTTPS communication (default value is UseIEProxySettings.
UseProxySettings | Uses a user-defined proxy for all HTTP and HTTPS communication (default value is UseIEProxySettings.

See Also

Settings Class | DeviceMgr Namespace


Settings.DisableProxy Method

Disables the use of proxy for all HTTP and HTTPS communication (default value is UseIEProxySettings.

[Visual Basic]
Public Shared Sub DisableProxy()
[C#]
public static void DisableProxy();

Remarks

  • Use DisableProxy method to disable use of proxy.
  • Use UseIEProxySettings method to specify that the proxy settings in IE should be used.
  • Use UseProxySettings method to specify manual proxy settings.

See Also

Settings Class | DeviceMgr Namespace


Settings.EnableDebugLog Method

Outputs log statements describing the component activity to screen, disk or other targets specified in the configuration file (default value is false).

[Visual Basic]
Public Shared Sub EnableDebugLog( _
ByVal enable As Boolean _
)
[C#]
public static void EnableDebugLog(
bool enable
);

Parameters

enable
Enable or disable debug logging.

Remarks

The component logs all activity using log4net (log4net.dll). By editing DeviceMgr.dll.config a programmer can configure logging output.

A software used by developers at Axis for viewing the log statements as a program executes is DebugView. It has highlight and filter features making it easier to read and find log statements.

See Also

Settings Class | DeviceMgr Namespace | log4net | DebugView


Settings.SetCertificatePolicy Method

Setting the policy whether to allow communication with Axis devices even though they have invalid certificates (default value is to disallow invalid certificates).

[Visual Basic]
Public Shared Sub SetCertificatePolicy( _
ByVal allowInvalidCertificates As Boolean _
)
[C#]
public static void SetCertificatePolicy(
bool allowInvalidCertificates
);

Parameters

allowInvalidCertificates
true to allow HTTPS communication even though there are certificate problems; otherwise false.

Remarks

A certificate may be invalid due to numerous reasons, e.g.,

  • The validation date has expired.
  • The certificate has not been installed on the computer.
  • The certificate has an invalid name.

See Also

Settings Class | DeviceMgr Namespace


Settings.UseIEProxySettings Method

Uses Internet Explorer's proxy settings for all HTTP and HTTPS communication (default value is UseIEProxySettings.

[Visual Basic]
Public Shared Sub UseIEProxySettings()
[C#]
public static void UseIEProxySettings();

Remarks

Use UseIEProxySettings method to specify that the proxy settings in IE should be used or use UseProxySettings method to specify manual proxy settings.

  • Use DisableProxy method to disable use of proxy.
  • Use UseIEProxySettings method to specify that the proxy settings in IE should be used.
  • Use UseProxySettings method to specify manual proxy settings.

See Also

Settings Class | DeviceMgr Namespace


Settings.UseProxySettings Method

Uses a user-defined proxy for all HTTP and HTTPS communication (default value is UseIEProxySettings.

[Visual Basic]
Public Shared Sub UseProxySettings( _
ByVal address As String, _
ByVal port As Integer, _
ByVal bypassList As String, _
ByVal bypassLocal As Boolean _
)
[C#]
public static void UseProxySettings(
string address,
int port,
string bypassList,
bool bypassLocal
);

Parameters

address
The address of the proxy server.
port
The port number of the proxy server.
bypassList
The bypass list, e.g., *.axis.com;10*;169.254.*.
bypassLocal
true if bypassing on local addresses; otherwise false.

Remarks

  • Use DisableProxy method to disable use of proxy.
  • Use UseIEProxySettings method to specify that the proxy settings in IE should be used.
  • Use UseProxySettings method to specify manual proxy settings.

See Also

Settings Class | DeviceMgr Namespace


Software Class

Product software (i.e. firmware) with a specific SoftwareVersion used in Update.

For a list of all members of this type, see Software Members.

System.Object
DeviceMgr.Software

[Visual Basic]
Public Class Software
[C#]
public class Software

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

A Software describes a downloadable file from Axis web site. The Software belongs to a Product and is described by its Version.

This class is part of a group of related classes used to query www.axis.com for available firmware updates.

The BeginGetAvailableSoftware method in the Update class is used to check for available firmware updates at www.axis.com and returns AvailableSoftware objects. AvailableSoftware contains a ProductList, which contains the list of available Product updates. Each Product has a name like e.g. "AXIS 211" and contains a SoftwareList, which is a list of available software (i.e. firmware files) for that product model. Each Software has a SoftwareVersion, e.g. 4.40.

With an AvailableSoftware object returned from the Update class it is possible to get the list of available firmware files (Software objects). These Software objects are then specified when downloading available software using the BeginDownload method in the Update class.

Example

See update sample (C#) on how to use the methods.

Requirements

Namespace: DeviceMgr

Assembly: DeviceMgr (in DeviceMgr.dll)

See Also

Software Members | DeviceMgr Namespace | Update | Product | SoftwareList | SoftwareVersion | Update sample (C#)


Software Members

Software overview

Public Instance Properties

Version Gets the SoftwareVersion of the Software.

See Also

Software Class | DeviceMgr Namespace | Update | Product | SoftwareList | SoftwareVersion | Update sample (C#)


Software Properties

The properties of the Software class are listed below. For a complete list of Software class members, see the Software Members topic.

Public Instance Properties

Version Gets the SoftwareVersion of the Software.

See Also

Software Class | DeviceMgr Namespace | Update | Product | SoftwareList | SoftwareVersion | Update sample (C#)


Version Property

AXIS Camera Management SDK 2.00

Software.Version Property

Gets the SoftwareVersion of the Software.

[Visual Basic]
Public ReadOnly Property Version As SoftwareVersion
[C#]
public SoftwareVersion Version {get;}

Property Value

The SoftwareVersion of the Software.

Example

See update sample (C#) on how to use the methods.

See Also

Software Class | DeviceMgr Namespace | Update | Product | SoftwareList | SoftwareVersion | Update sample (C#)


SoftwareList Class

A list of Software objects.

For a list of all members of this type, see SoftwareList Members.

System.Object
DeviceMgr.SoftwareList

[Visual Basic]
Public Class SoftwareList
Implements IEnumerable
[C#]
public class SoftwareList : IEnumerable

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

This class is part of a group of related classes used to query www.axis.com for available firmware updates.

The BeginGetAvailableSoftware method in the Update class is used to check for available firmware updates at www.axis.com and returns AvailableSoftware objects. AvailableSoftware contains a ProductList, which contains the list of available Product updates. Each Product has a name like e.g. "AXIS 211" and contains a SoftwareList, which is a list of available software (i.e. firmware files) for that product model. Each Software has a SoftwareVersion, e.g. 4.40.

With an AvailableSoftware object returned from the Update class it is possible to get the list of available firmware files (Software objects). These Software objects are then specified when downloading available software using the BeginDownload method in the Update class.

Example

See update sample (C#) on how to use the methods.

Requirements

Namespace: DeviceMgr

Assembly: DeviceMgr (in DeviceMgr.dll)

See Also

SoftwareList Members | DeviceMgr Namespace | Update | Product | Software | SoftwareVersion | Update sample (C#)


SoftwareList Members

SoftwareList overview

Public Instance Properties

Item Gets the Software at the specified indexed location in the list.

Public Instance Methods

GetEnumerator Returns an enumerator that iterates through the Software.

See Also

SoftwareList Class | DeviceMgr Namespace | Update | Product | Software | SoftwareVersion | Update sample (C#)


SoftwareList Properties

The properties of the SoftwareList class are listed below. For a complete list of SoftwareList class members, see the SoftwareList Members topic.

Public Instance Properties

Item Gets the Software at the specified indexed location in the list.

See Also

SoftwareList Class | DeviceMgr Namespace | Update | Product | Software | SoftwareVersion | Update sample (C#)


Item Property

AXIS Camera Management SDK 2.00

SoftwareList.Item Property

Gets the Software at the specified indexed location in the list.

[Visual Basic]
Public Default ReadOnly Property Item( _
ByVal index As Integer _
) As Software
[C#]
public Software this[
int index
] {get;}

Parameters

index
The indexed location of the Software in the list.

Property Value

The Software at the specified indexed location in the list.

Example

See update sample (C#) on how to use the methods.

See Also

SoftwareList Class | DeviceMgr Namespace | Update | Product | Software | SoftwareVersion | Update sample (C#)


SoftwareList Methods

The methods of the SoftwareList class are listed below. For a complete list of SoftwareList class members, see the SoftwareList Members topic.

Public Instance Methods

GetEnumerator Returns an enumerator that iterates through the Software.

See Also

SoftwareList Class | DeviceMgr Namespace | Update | Product | Software | SoftwareVersion | Update sample (C#)


SoftwareList.GetEnumerator Method

Returns an enumerator that iterates through the Software.

[Visual Basic]
NotOverridable Public Function GetEnumerator() As IEnumerator _
Implements IEnumerable.GetEnumerator
[C#]
public IEnumerator GetEnumerator();

Return Value

An IEnumerator for the SoftwareList instance.

Implements

IEnumerable.GetEnumerator

Example

See update sample (C#) on how to use the methods.

See Also

SoftwareList Class | DeviceMgr Namespace | Update | Product | Software | SoftwareVersion | Update sample (C#)


SoftwareVersion Class

A specific version of a Software object like e.g. 4.40.

For a list of all members of this type, see SoftwareVersion Members.

System.Object
DeviceMgr.SoftwareVersion

[Visual Basic]
Public Class SoftwareVersion
Implements IComparable
[C#]
public class SoftwareVersion : IComparable

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

SoftwareVersion consist of two to five components: major, minor, build, revision and info. The major and minor components are required; the build, revision and info components are optional, but the build component is required if the revision component is defined. All defined components, except info, must be integers greater than or equal to 0. The format of the version number is as follows. Optional components are shown in square brackets ('[' and ']'):

major.minor[.build[.revision]] [info]
E.g. "4.30", "4.30 beta" or "4.40.1 alpha".

This class is part of a group of related classes used to query www.axis.com for available firmware updates.

The BeginGetAvailableSoftware method in the Update class is used to check for available firmware updates at www.axis.com and returns AvailableSoftware objects. AvailableSoftware contains a ProductList, which contains the list of available Product updates. Each Product has a name like e.g. "AXIS 211" and contains a SoftwareList, which is a list of available software (i.e. firmware files) for that product model. Each Software has a SoftwareVersion, e.g. 4.40.

With an AvailableSoftware object returned from the Update class it is possible to get the list of available firmware files (Software objects). These Software objects are then specified when downloading available software using the BeginDownload method in the Update class.

Example

See update sample (C#) on how to use the methods.

Requirements

Namespace: DeviceMgr

Assembly: DeviceMgr (in DeviceMgr.dll)

See Also

SoftwareVersion Members | DeviceMgr Namespace | Update | Product | SoftwareList | Software | Update sample (C#)


SoftwareVersion Members

SoftwareVersion overview

Public Instance Constructors

SoftwareVersion Overloaded. Initializes a new instance of the SoftwareVersion class.

Public Instance Methods

CompareTo | Compares this instance to a specified object and returns an indication of their relative values.
ToString | Converts the value of this instance to a String containing data describing the SoftwareVersion.

See Also

SoftwareVersion Class | DeviceMgr Namespace | Update | Product | SoftwareList | Software | Update sample (C#)


SoftwareVersion Constructor

Initializes a new instance of the SoftwareVersion class.

Overload List

Initializes a new instance of the SoftwareVersion class.

public SoftwareVersion(string);

Initializes a new instance of the SoftwareVersion class.

public SoftwareVersion(string,string,string,string,string);

See Also

SoftwareVersion Class | DeviceMgr Namespace | Update | Product | SoftwareList | Software | Update sample (C#)


SoftwareVersion Constructor (String)

Initializes a new instance of the SoftwareVersion class.

[Visual Basic]
Overloads Public Sub New( _
ByVal version As String _
)
[C#]
public SoftwareVersion(
string version
);

Parameters

version
A String containing the major, minor, build, and revision numbers, where each number is delimited with a period character ('.'). It is also possible to append an info String.

Remarks

The format of the version number is as follows. Optional components are shown in square brackets ('[' and ']'):

major.minor[.build[.revision]] [info]
E.g. "4.30", "4.30 beta" or "4.40.1 alpha".

Example

See update sample (C#) on how to use the methods.

See Also

SoftwareVersion Class | DeviceMgr Namespace | SoftwareVersion Constructor Overload List | Update | Product | SoftwareList | Software | Update sample (C#)


SoftwareVersion Constructor (String, String, String, String, String)

Initializes a new instance of the SoftwareVersion class.

[Visual Basic]
Overloads Public Sub New( _
ByVal major As String, _
ByVal minor As String, _
ByVal build As String, _
ByVal revision As String, _
ByVal info As String _
)
[C#]
public SoftwareVersion(
string major,
string minor,
string build,
string revision,
string info
);

Parameters

major
The major version number.
minor
The minor version number.
build
The build number.
revision
The revision number.
info
The info message.

Example

See update sample (C#) on how to use the methods.

See Also

SoftwareVersion Class | DeviceMgr Namespace | SoftwareVersion Constructor Overload List | Update | Product | SoftwareList | Software | Update sample (C#)


SoftwareVersion Methods

The methods of the SoftwareVersion class are listed below. For a complete list of SoftwareVersion class members, see the SoftwareVersion Members topic.

Public Instance Methods

CompareTo | Compares this instance to a specified object and returns an indication of their relative values.
ToString | Converts the value of this instance to a String containing data describing the SoftwareVersion.

See Also

SoftwareVersion Class | DeviceMgr Namespace | Update | Product | SoftwareList | Software | Update sample (C#)


SoftwareVersion.CompareTo Method

Compares this instance to a specified object and returns an indication of their relative values.

[Visual Basic]
NotOverridable Public Function CompareTo( _
ByVal obj As Object _
) As Integer _
Implements IComparable.CompareTo
[C#]
public int CompareTo(
object obj
);

Parameters

obj
An object to compare to this instance.

Return Value

A signed integer that indicates the relative order of this instance and obj.

Implements

IComparable.CompareTo

Example

See update sample (C#) on how to use the methods.

See Also

SoftwareVersion Class | DeviceMgr Namespace | Update | Product | SoftwareList | Software | Update sample (C#)


SoftwareVersion.ToString Method

Converts the value of this instance to a String containing data describing the SoftwareVersion.

[Visual Basic]
Overrides Public Function ToString() As String
[C#]
public override string ToString();

Return Value

A String whose value represents the SoftwareVersion.

Example

See update sample (C#) on how to use the methods.

See Also

SoftwareVersion Class | DeviceMgr Namespace | Update | Product | SoftwareList | Software | Update sample (C#)


Status Class

Used when monitoring Axis devices on the network.

For a list of all members of this type, see Status Members.

System.Object
DeviceMgr.Status

[Visual Basic]
Public Class Status
[C#]
public class Status

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

At given time intervals the status of the device is checked. If a device has been inaccessible for a specified number of status checks, set in MaxFailedCount, monitoring of the device is stopped.

Example

See status sample (C#) on how to use the Status methods.

Requirements

Namespace: DeviceMgr

Assembly: DeviceMgr (in DeviceMgr.dll)

See Also

Status Members | DeviceMgr Namespace | Status sample (C#)


Status Members

Status overview

Public Static (Shared) Methods

ReenableAllFailed Starts monitoring all added devices.

Public Instance Constructors

Status Constructor Initializes a new instance of the Status class.

Public Instance Properties

CheckIntervall | Gets or sets the time interval between status checks.
MaxFailedCount | Gets or sets the maximum number of failed attempts before stop checking a specific ConnectionInfo.

Public Instance Methods

Add | Overloaded. Adds a ConnectionInfo, where the address points to a device with a specific serial number, to be monitored.
RecheckStatus | Overloaded. Rechecks status of device with specified serial number within 15 seconds.
Remove | Overloaded. Removes a ConnectionInfo from monitoring.
RemoveAll | Removes all monitored ConnectionInfo.
SetNewConnectionInfo | Overloaded. Replaces a monitored ConnectionInfo.

Public Instance Events

StatusUpdate Reports the network availability status of devices on the network.

See Also

Status Class | DeviceMgr Namespace | Status sample (C#)


Status Constructor

Initializes a new instance of the Status class.

[Visual Basic]
Public Sub New()
[C#]
public Status();

Example

See status sample (C#) on how to use the Status methods.

See Also

Status Class | DeviceMgr Namespace | Status sample (C#)


Status Properties

The properties of the Status class are listed below. For a complete list of Status class members, see the Status Members topic.

Public Instance Properties

CheckIntervall | Gets or sets the time interval between status checks.
MaxFailedCount | Gets or sets the maximum number of failed attempts before stop checking a specific ConnectionInfo.

See Also

Status Class | DeviceMgr Namespace | Status sample (C#)


CheckIntervall Property

AXIS Camera Management SDK 2.00

Status.CheckIntervall Property

Gets or sets the time interval between status checks.

[Visual Basic]
Public Property CheckIntervall As Integer
[C#]
public int CheckIntervall {get; set;}

Property Value

The time interval in milliseconds between status checks. Default value is 120000 ms (2 min).

Example

See status sample (C#) on how to use the Status methods.

See Also

Status Class | DeviceMgr Namespace | Status sample (C#)


MaxFailedCount Property

AXIS Camera Management SDK 2.00

Status.MaxFailedCount Property

Gets or sets the maximum number of failed attempts before stop checking a specific ConnectionInfo.

[Visual Basic]
Public Property MaxFailedCount As Integer
[C#]
public int MaxFailedCount {get; set;}

Property Value

The number of maximum failed attempts.

Remarks

It is possible to start monitoring all devices by using ReenableAllFailed.

Example

See status sample (C#) on how to use the Status methods.

See Also

Status Class | DeviceMgr Namespace | Status sample (C#)


Status Methods

The methods of the Status class are listed below. For a complete list of Status class members, see the Status Members topic.

Public Static (Shared) Methods

ReenableAllFailed Starts monitoring all added devices.

Public Instance Methods

Add | Overloaded. Adds a ConnectionInfo, where the address points to a device with a specific serial number, to be monitored.
RecheckStatus | Overloaded. Rechecks status of device with specified serial number within 15 seconds.
Remove | Overloaded. Removes a ConnectionInfo from monitoring.
RemoveAll | Removes all monitored ConnectionInfo.
SetNewConnectionInfo | Overloaded. Replaces a monitored ConnectionInfo.

See Also

Status Class | DeviceMgr Namespace | Status sample (C#)


Add Method

AXIS Camera Management SDK 2.00

Status.Add Method

Adds a ConnectionInfo to be monitored.

Overload List

Adds a ConnectionInfo to be monitored.

public void Add(ConnectionInfo,object);

Adds a ConnectionInfo, where the address points to a device with a specific serial number, to be monitored.

public void Add(ConnectionInfo,string,object);

See Also

Status Class | DeviceMgr Namespace | Status sample (C#)


Status.Add Method (ConnectionInfo, Object)

Adds a ConnectionInfo to be monitored.

[Visual Basic]
Overloads Public Sub Add( _
ByVal connectionInfo As ConnectionInfo, _
ByVal state As Object _
)
[C#]
public void Add(
ConnectionInfo connectionInfo,
object state
);

Parameters

connectionInfo
The connection info used when accessing the device.
state
A user provided object that is passed to the method invoked when the asynchronous operation completes or in the result and can e.g. contain user state information.

Remarks

If the serial number of the device is known, it is recommended to use the Status.Add function, where the serial number can be specified. This gives more accurate status event updates, since the StatusMgr can utilize multicast discovery notification packets. It will also lower network bandwidth.

Example

See status sample (C#) on how to use the Status methods.

See Also

Status Class | DeviceMgr Namespace | Status.Add Overload List | Status sample (C#)


Status.Add Method (ConnectionInfo, String, Object)

Adds a ConnectionInfo, where the address points to a device with a specific serial number, to be monitored.

[Visual Basic]
Overloads Public Sub Add( _
ByVal connectionInfo As ConnectionInfo, _
ByVal serialNumber As String, _
ByVal state As Object _
)
[C#]
public void Add(
ConnectionInfo connectionInfo,
string serialNumber,
object state
);

Parameters

connectionInfo
The connection info used when accessing the device.
serialNumber
The serial number of the device.
state
A user provided object that is passed to the method invoked when the asynchronous operation completes or in the result and can e.g. contain user state information.

Remarks

If the serial number of the device is known, it is recommended to use the Status.Add function, where the serial number can be specified. This gives more accurate status event updates, since the StatusMgr can utilize multicast discovery notification packets. It will also lower network bandwidth consumption.

Example

See status sample (C#) on how to use the Status methods.

See Also

Status Class | DeviceMgr Namespace | Status.Add Overload List | Status sample (C#)


RecheckStatus Method

AXIS Camera Management SDK 2.00

Status.RecheckStatus Method

Rechecks status of ConnectionInfo within 15 seconds.

Overload List

Rechecks status of ConnectionInfo within 15 seconds.

public void RecheckStatus(ConnectionInfo);

Rechecks status of device with specified serial number within 15 seconds.

public void RecheckStatus(string);

See Also

Status Class | DeviceMgr Namespace | Status sample (C#)


Status.RecheckStatus Method (ConnectionInfo)

Rechecks status of ConnectionInfo within 15 seconds.

[Visual Basic]
Overloads Public Sub RecheckStatus( _
ByVal connectionInfo As ConnectionInfo _
)
[C#]
public void RecheckStatus(
ConnectionInfo connectionInfo
);

Parameters

connectionInfo
The connection info used when accessing the device.

Example

See status sample (C#) on how to use the Status methods.

See Also

Status Class | DeviceMgr Namespace | Status.RecheckStatus Overload List | Status sample (C#)


Status.RecheckStatus Method (String)

Rechecks status of device with specified serial number within 15 seconds.

[Visual Basic]
Overloads Public Sub RecheckStatus( _
ByVal serialNumber As String _
)
[C#]
public void RecheckStatus(
string serialNumber
);

Parameters

serialNumber
The serial number of the device.

Example

See status sample (C#) on how to use the Status methods.

See Also

Status Class | DeviceMgr Namespace | Status.RecheckStatus Overload List | Status sample (C#)


Status.ReenableAllFailed Method

Starts monitoring all added devices.

[Visual Basic]
Public Shared Sub ReenableAllFailed()
[C#]
public static void ReenableAllFailed();

Remarks

A device is failed when the number succeeding connection attempts, specified in MaxFailedCount, all fails. Calling ReenableAllFailed will start checking these devices again.

Example

See status sample (C#) on how to use the Status methods.

See Also

Status Class | DeviceMgr Namespace | Status sample (C#)


Remove Method

AXIS Camera Management SDK 2.00

Status.Remove Method

Removes a ConnectionInfo from monitoring.

Overload List

Removes a ConnectionInfo from monitoring.

public void Remove(ConnectionInfo);

Removes a device with a specific serial number from monitoring.

public void Remove(string);

See Also

Status Class | DeviceMgr Namespace | Status sample (C#)


Status.Remove Method (ConnectionInfo)

Removes a ConnectionInfo from monitoring.

[Visual Basic]
Overloads Public Sub Remove( _
ByVal connectionInfo As ConnectionInfo _
)
[C#]
public void Remove(
ConnectionInfo connectionInfo
);

Parameters

connectionInfo
The connection info used when accessing the device.

Example

See status sample (C#) on how to use the Status methods.

See Also

Status Class | DeviceMgr Namespace | Status.Remove Overload List | Status sample (C#)


Status.Remove Method (String)

Removes a device with a specific serial number from monitoring.

[Visual Basic]
Overloads Public Sub Remove( _
ByVal serialNumber As String _
)
[C#]
public void Remove(
string serialNumber
);

Parameters

serialNumber
The serial number of the device.

Example

See status sample (C#) on how to use the Status methods.

See Also

Status Class | DeviceMgr Namespace | Status.Remove Overload List | Status sample (C#)


Status.RemoveAll Method

Removes all monitored ConnectionInfo.

[Visual Basic]
Public Sub RemoveAll()
[C#]
public void RemoveAll();

Example

See status sample (C#) on how to use the Status methods.

See Also

Status Class | DeviceMgr Namespace | Status sample (C#)


SetNewConnectionInfo Method

AXIS Camera Management SDK 2.00

Status.SetNewConnectionInfo Method

Replaces a monitored ConnectionInfo.

Overload List

Replaces a monitored ConnectionInfo.

public void SetNewConnectionInfo(ConnectionInfo,ConnectionInfo,object);

Sets new ConnectionInfo to a device with a specific serial number.

public void SetNewConnectionInfo(string,ConnectionInfo,object);

See Also

Status Class | DeviceMgr Namespace | Status sample (C#)


Status.SetNewConnectionInfo Method (ConnectionInfo, ConnectionInfo, Object)

Replaces a monitored ConnectionInfo.

[Visual Basic]
Overloads Public Sub SetNewConnectionInfo( _
ByVal oldConnectionInfo As ConnectionInfo, _
ByVal newConnectionInfo As ConnectionInfo, _
ByVal state As Object _
)
[C#]
public void SetNewConnectionInfo(
ConnectionInfo oldConnectionInfo,
ConnectionInfo newConnectionInfo,
object state
);

Parameters

oldConnectionInfo
The old ConnectionInfo.
newConnectionInfo
The new ConnectionInfo.
state
A user provided object that is passed to the method invoked when the asynchronous operation completes or in the result and can e.g. contain user state information.

Example

See status sample (C#) on how to use the Status methods.

See Also

Status Class | DeviceMgr Namespace | Status.SetNewConnectionInfo Overload List | Status sample (C#)


Status.SetNewConnectionInfo Method (String, ConnectionInfo, Object)

Sets new ConnectionInfo to a device with a specific serial number.

[Visual Basic]
Overloads Public Sub SetNewConnectionInfo( _
ByVal serialNumber As String, _
ByVal newConnectionInfo As ConnectionInfo, _
ByVal state As Object _
)
[C#]
public void SetNewConnectionInfo(
string serialNumber,
ConnectionInfo newConnectionInfo,
object state
);

Parameters

serialNumber
The serial number of the device.
newConnectionInfo
The new ConnectionInfo.
state
A user provided object that is passed to the method invoked when the asynchronous operation completes or in the result and can e.g. contain user state information.

Example

See status sample (C#) on how to use the Status methods.

See Also

Status Class | DeviceMgr Namespace | Status.SetNewConnectionInfo Overload List | Status sample (C#)


Status Events

The events of the Status class are listed below. For a complete list of Status class members, see the Status Members topic.

Public Instance Events

StatusUpdate Reports the network availability status of devices on the network.

See Also

Status Class | DeviceMgr Namespace | Status sample (C#)


Status.StatusUpdate Event

Reports the network availability status of devices on the network.

[Visual Basic]
Public Event StatusUpdate As StatusEventHandler
[C#]
public event StatusEventHandler StatusUpdate;

Event Data

The event handler receives an argument of type StatusEventArgs containing data related to this event. The following StatusEventArgs properties provide information specific to this event.

Property | Description
AsyncState | Gets or sets a user provided state object.
ConnectionInfo | Gets the ConnectionInfo specifying a device being monitored.
IsAlive | Gets a value indicating whether a device is accessible using HTTP or HTTPS.
IsNetworkAlive | Gets a value indicating whether a device is accessible using ping and/or receives UDP packets from the device, but the connection fails when using HTTP or HTTPS.
SerialNumber | Gets the serial number specifying a device being monitored.

Example

See status sample (C#) on how to use the Status methods.

See Also

Status Class | DeviceMgr Namespace | Status sample (C#)


StatusEventArgs Class

Provides data for the StatusUpdate event.

For a list of all members of this type, see StatusEventArgs Members.

System.Object
System.EventArgs
DeviceMgr.StatusEventArgs

[Visual Basic]
Public Class StatusEventArgs
Inherits EventArgs
[C#]
public class StatusEventArgs : EventArgs

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

The StatusUpdate event occurs as long as a device is monitored on the network. The time-span between two events can be set in CheckIntervall. A StatusEventArgs specifies a devices connection info, serial number, whether it is accessible using HTTP or HTTPS, and whether it is accessible using ping and/or receives UDP packets.

Example

See status sample (C#) on how to use the Status methods.

Requirements

Namespace: DeviceMgr

Assembly: DeviceMgr (in DeviceMgr.dll)

See Also

StatusEventArgs Members | DeviceMgr Namespace | Status | StatusEventHandler | Status sample (C#)


StatusEventArgs Members

StatusEventArgs overview

Public Instance Properties

AsyncState | Gets or sets a user provided state object.
ConnectionInfo | Gets the ConnectionInfo specifying a device being monitored.
IsAlive | Gets a value indicating whether a device is accessible using HTTP or HTTPS.
IsNetworkAlive | Gets a value indicating whether a device is accessible using ping and/or receives UDP packets from the device, but the connection fails when using HTTP or HTTPS.
SerialNumber | Gets the serial number specifying a device being monitored.

See Also

StatusEventArgs Class | DeviceMgr Namespace | Status | StatusEventHandler | Status sample (C#)


StatusEventArgs Properties

The properties of the StatusEventArgs class are listed below. For a complete list of StatusEventArgs class members, see the StatusEventArgs Members topic.

Public Instance Properties

AsyncState | Gets or sets a user provided state object.
ConnectionInfo | Gets the ConnectionInfo specifying a device being monitored.
IsAlive | Gets a value indicating whether a device is accessible using HTTP or HTTPS.
IsNetworkAlive | Gets a value indicating whether a device is accessible using ping and/or receives UDP packets from the device, but the connection fails when using HTTP or HTTPS.
SerialNumber | Gets the serial number specifying a device being monitored.

See Also

StatusEventArgs Class | DeviceMgr Namespace | Status | StatusEventHandler | Status sample (C#)


AsyncState Property

AXIS Camera Management SDK 2.00

StatusEventArgs.AsyncState Property

Gets or sets a user provided state object.

[Visual Basic]
Public Property AsyncState As Object
[C#]
public object AsyncState {get; set;}

Property Value

Gets or sets a user provided state object.

Example

See status sample (C#) on how to use the Status methods.

See Also

StatusEventArgs Class | DeviceMgr Namespace | Status | StatusEventHandler | Status sample (C#)


ConnectionInfo Property

AXIS Camera Management SDK 2.00

StatusEventArgs.ConnectionInfo Property

Gets the ConnectionInfo specifying a device being monitored.

[Visual Basic]
Public ReadOnly Property ConnectionInfo As ConnectionInfo
[C#]
public ConnectionInfo ConnectionInfo {get;}

Property Value

The connection info used when accessing a device.

Example

See status sample (C#) on how to use the Status methods.

See Also

StatusEventArgs Class | DeviceMgr Namespace | Status | StatusEventHandler | Status sample (C#)


IsAlive Property

AXIS Camera Management SDK 2.00

StatusEventArgs.IsAlive Property

Gets a value indicating whether a device is accessible using HTTP or HTTPS.

[Visual Basic]
Public ReadOnly Property IsAlive As Boolean
[C#]
public bool IsAlive {get;}

Property Value

true if access was established using HTTP or HTTPS; otherwise false.

Remarks

If a device cannot be contacted, it may be due to a problem with network connection or the device itself.

Example

See status sample (C#) on how to use the Status methods.

See Also

StatusEventArgs Class | DeviceMgr Namespace | Status | StatusEventHandler | Status sample (C#)


IsNetworkAlive Property

AXIS Camera Management SDK 2.00

StatusEventArgs.IsNetworkAlive Property

Gets a value indicating whether a device is accessible using ping and/or receives UDP packets from the device, but the connection fails when using HTTP or HTTPS.

[Visual Basic]
Public ReadOnly Property IsNetworkAlive As Boolean
[C#]
public bool IsNetworkAlive {get;}

Property Value

true if access was established using ping and/or UDP; otherwise false.

Remarks

A device not being network alive can be the result of:

  • Incorrect proxy settings.
  • Trying to access the device using HTTPS, but HTTPS is disabled in the device.
  • Neither HTTP nor HTTPS has been enabled in the device.

Example

See status sample (C#) on how to use the Status methods.

See Also

StatusEventArgs Class | DeviceMgr Namespace | Status | StatusEventHandler | Status sample (C#)


SerialNumber Property

AXIS Camera Management SDK 2.00

StatusEventArgs.SerialNumber Property

Gets the serial number specifying a device being monitored.

[Visual Basic]
Public ReadOnly Property SerialNumber As String
[C#]
public string SerialNumber {get;}

Property Value

The serial number of the device.

Example

See status sample (C#) on how to use the Status methods.

See Also

StatusEventArgs Class | DeviceMgr Namespace | Status | StatusEventHandler | Status sample (C#)


StatusEventHandler Delegate

Represents the method that will handle the StatusUpdate event of Status.

[Visual Basic]
Public Delegate Sub StatusEventHandler( _
ByVal sender As Object, _
ByVal e As StatusEventArgs _
)
[C#]
public delegate void StatusEventHandler(
object sender,
StatusEventArgs e
);

Parameters

sender
The source of the event.
e
An StatusEventArgs that contains the event data.

Remarks

When you create a StatusEventHandler delegate, you identify the method that will handle the event. To associate the event with your event handler, add an instance of the delegate to the event. The event handler is called whenever the event occurs, unless you remove the delegate.

Example

See status sample (C#) on how to use the Status methods.

Requirements

Namespace: DeviceMgr

Assembly: DeviceMgr (in DeviceMgr.dll)

See Also

DeviceMgr Namespace | Status | StatusEventArgs | Status sample (C#)


Template Class

Used when applying templates to Axis devices on the network.

For a list of all members of this type, see Template Members.

System.Object
DeviceMgr.Template

[Visual Basic]
Public Class Template
[C#]
public class Template

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

A template is a String containing functions or parameters to set. The component will parse the text, and perform the various template lines in the same order as they are listed. Supported template function constants are listed in TemplateConst.

Templates can be created in common text editors and saved on disk for further use. All parameters and functions in templates exists within a certain namespace.

[Image.I0.Appearance]
Resolution  = "640x480"
Compression = "30"
The two parameters exists within the stated namespace Image.I0.Appearance. Another way to write the same template would be to write the complete parameter names:
Image.I0.Appearance.Resolution  = "640x480"
Image.I0.Appearance.Compression = "30"
Remind that stating namespaces affect all successive template lines, and clearing it, by stating "[]" may be necessary.
[Image.I0.Appearance]
Resolution  = "640x480"
Compression = "30"

[]
mgr.SetDate(date = "TODAY", time = "NOW")

Example

See template sample (C#) or template sample (C++) on how to use the Template methods.

Requirements

Namespace: DeviceMgr

Assembly: DeviceMgr (in DeviceMgr.dll)

See Also

Template Members | DeviceMgr Namespace | TemplateConst | Apply template sample (C#) | Apply template using operation sample (C++) | The Asynchronous Pattern


Template Members

Template overview

Public Static (Shared) Methods

AddApplyTemplate Adds the function to apply a template to an existing Operation.

Public Instance Constructors

Template Constructor Initializes a new instance of the Template class.

Public Instance Methods

BeginApplyTemplate | Begins an asynchronous request for applying a template to a device.
Cancel | Cancels asynchronous requests started with the BeginApplyTemplate method.
EndApplyTemplate | Waits for BeginApplyTemplate to end and returns the Result.

Public Instance Events

ProgressUpdate Progress event during a BeginApplyTemplate request.

See Also

Template Class | DeviceMgr Namespace | TemplateConst | Apply template sample (C#) | Apply template using operation sample (C++) | The Asynchronous Pattern


Template Constructor

Initializes a new instance of the Template class.

[Visual Basic]
Public Sub New()
[C#]
public Template();

Example

See template sample (C#) or template sample (C++) on how to use the Template methods.

See Also

Template Class | DeviceMgr Namespace | TemplateConst | Apply template sample (C#) | Apply template using operation sample (C++)


Template Methods

The methods of the Template class are listed below. For a complete list of Template class members, see the Template Members topic.

Public Static (Shared) Methods

AddApplyTemplate Adds the function to apply a template to an existing Operation.

Public Instance Methods

BeginApplyTemplate | Begins an asynchronous request for applying a template to a device.
Cancel | Cancels asynchronous requests started with the BeginApplyTemplate method.
EndApplyTemplate | Waits for BeginApplyTemplate to end and returns the Result.

See Also

Template Class | DeviceMgr Namespace | TemplateConst | Apply template sample (C#) | Apply template using operation sample (C++) | The Asynchronous Pattern


Template.AddApplyTemplate Method

Adds the function to apply a template to an existing Operation.

[Visual Basic]
Public Shared Sub AddApplyTemplate( _
ByVal operation As Operation, _
ByVal connectionInfo As ConnectionInfo, _
ByVal template As String, _
ByVal state As Object _
)
[C#]
public static void AddApplyTemplate(
Operation operation,
ConnectionInfo connectionInfo,
string template,
object state
);

Parameters

operation
The operation this function is added to.
connectionInfo
The connection info used when accessing the device.
template
The template as a String.
state
A user provided object that is passed to the method invoked when the asynchronous operation completes or in the result and can e.g. contain user state information.

Remarks

Note A template is a String containing functions or parameters to set. The component will parse the text, and perform the various steps in the template in the same order as they are listed. Supported template function constants are listed in TemplateConst.

Example

See template sample (C#) or template sample (C++) on how to use the Template methods.

See Also

Template Class | DeviceMgr Namespace | TemplateConst | Apply template sample (C#) | Apply template using operation sample (C++)


Template.BeginApplyTemplate Method

Begins an asynchronous request for applying a template to a device.

[Visual Basic]
Public Function BeginApplyTemplate( _
ByVal connectionInfo As ConnectionInfo, _
ByVal template As String, _
ByVal callback As AsyncCallback, _
ByVal state As Object _
) As IAsyncResult
[C#]
public IAsyncResult BeginApplyTemplate(
ConnectionInfo connectionInfo,
string template,
AsyncCallback callback,
object state
);

Parameters

connectionInfo
The connection info used when accessing the device.
template
The template as a String.
callback
The AsyncCallback delegate.
state
A user provided object that is passed to the method invoked when the asynchronous operation completes or in the result and can e.g. contain user state information.

Return Value

An IAsyncResult that references the asynchronous request.

Remarks

The BeginApplyTemplate method starts an asynchronous request for applying a template to a device. The callback method that implements the AsyncCallback delegate uses the EndApplyTemplate method to return the Result.

Note A template is a String containing functions or parameters to set. The component will parse the text, and perform the various steps in the template in the same order as they are listed. Supported template function constants are listed in TemplateConst.

Example

See template sample (C#) or template sample (C++) on how to use the Template methods.

See Also

Template Class | DeviceMgr Namespace | TemplateConst | Apply template sample (C#) | Apply template using operation sample (C++) | The Asynchronous Pattern


Template.Cancel Method

Cancels asynchronous requests started with the BeginApplyTemplate method.

[Visual Basic]
Public Sub Cancel( _
ByVal ar As IAsyncResult _
)
[C#]
public void Cancel(
IAsyncResult ar
);

Parameters

ar
The IAsyncResult handle returned by the corresponding Begin method.

Remarks

A Cancel call will not block and wait for the request to be canceled. Use asyncResult.AsyncWaitHandle.WaitOne(); or corresponding End method to wait for the request to be canceled or completed.

The returned values in the case of a subsequent corresponding End method depends on the timing of the Cancel call.

Note Canceling an ongoing request may produce an undefined result. For example, depending on the timing of the Cancel call, the request may have finished before the call could cancel it. Or in the case of an upgrade request, the firmware file may have been sent to the device, which will continue the upgrade even if the connection is disconnected by a cancel.

Example

See template sample (C#) or template sample (C++) on how to use the Template methods.

See Also

Template Class | DeviceMgr Namespace | TemplateConst | Apply template sample (C#) | Apply template using operation sample (C++) | The Asynchronous Pattern


Template.EndApplyTemplate Method

Waits for BeginApplyTemplate to end and returns the Result.

[Visual Basic]
Public Function EndApplyTemplate( _
ByVal ar As IAsyncResult _
) As Result
[C#]
public Result EndApplyTemplate(
IAsyncResult ar
);

Parameters

ar
The IAsyncResult handle returned by the corresponding Begin method.

Return Value

The Result describing the function status.

Example

See template sample (C#) or template sample (C++) on how to use the Template methods.

See Also

Template Class | DeviceMgr Namespace | TemplateConst | Apply template sample (C#) | Apply template using operation sample (C++) | The Asynchronous Pattern


Template Events

The events of the Template class are listed below. For a complete list of Template class members, see the Template Members topic.

Public Instance Events

ProgressUpdate Progress event during a BeginApplyTemplate request.

See Also

Template Class | DeviceMgr Namespace | TemplateConst | Apply template sample (C#) | Apply template using operation sample (C++) | The Asynchronous Pattern


Template.ProgressUpdate Event

Progress event during a BeginApplyTemplate request.

[Visual Basic]
Public Event ProgressUpdate As ProgressEventHandler
[C#]
public event ProgressEventHandler ProgressUpdate;

Event Data

The event handler receives an argument of type ProgressEventArgs containing data related to this event. The following ProgressEventArgs properties provide information specific to this event.

Property | Description
AsyncState | Gets an object containing information about the ProgressEventArgs.
Progress | Gets the progress percent.

Example

See template sample (C#) or template sample (C++) on how to use the Template methods.

See Also

Template Class | DeviceMgr Namespace | Apply template sample (C#) | Apply template using operation sample (C++)


TemplateConst Class

Containing constants used when building a Template.

For a list of all members of this type, see TemplateConst Members.

System.Object
DeviceMgr.TemplateConst

[Visual Basic]
Public Class TemplateConst
[C#]
public class TemplateConst

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

A template is a String containing functions or parameters to set. The component will parse the text, and perform the various template lines in the same order as they are listed.

Templates can be created in common text editors and saved on disk for further use. All parameters and functions in templates exists within a certain namespace.
[Image.I0.Appearance]
Resolution  = "640x480"
Compression = "30"
The two parameters exists within the stated namespace Image.I0.Appearance. Another way to write the same template would be to write the complete parameter names:
Image.I0.Appearance.Resolution  = "640x480"
Image.I0.Appearance.Compression = "30"
Remind that stating namespaces affect all successive template lines, and clearing it, by stating "[]" may be necessary.
[Image.I0.Appearance]
Resolution  = "640x480"
Compression = "30"

[]
mgr.SetDate(date = "TODAY", time = "NOW")

Example

See template sample (C#) or template sample (C++) on how to use the Template methods.

Requirements

Namespace: DeviceMgr

Assembly: DeviceMgr (in DeviceMgr.dll)

See Also

TemplateConst Members | DeviceMgr Namespace | Template | Apply template sample (C#) | Apply template using operation sample (C++)


TemplateConst Members

TemplateConst overview

Public Static (Shared) Properties

AssignIP_Name | Gets the template function name for assigning IP and enabling DHCP using AssignIP.
Config_Get_Name | Gets the template function name for getting parameters using Config.
Config_Set_Name | Gets the template function name for setting parameters using Config.
DateTime_Param_Date | Gets the Config parameter name for setting date.
DateTime_Param_Time | Gets the Config parameter name for setting time.
DateTime_Set_Name | Gets the template function name for setting date and time using Config.
DateTime_Value_Date_Today | Gets the Config parameter value for setting the computers date.
DateTime_Value_Time_Now | Gets the Config parameter value for setting the computers time.
FactoryDefault_Name | Gets the template function name for setting factory default using Maintenance.
FactoryDefault_Param_Method | Gets the Maintenance parameter name for which factory default method to use.
FactoryDefault_Value_Method_Hard | Gets the Maintenance parameter value for setting hard factory default, i.e. reset all parameters to original factory settings.
FactoryDefault_Value_Method_Normal | Gets the Maintenance parameter value for setting normal factory default, i.e. reset all parameters, except TCP/IP settings, to original factory settings.
Restart_Name | Gets the template function name for restarting using Maintenance.
Update_Name | Gets the template function name for updating available software from Axis web site using Update.
Upgrade_Name | Gets the template function name for Upgrade.
Upgrade_Param_FactoryDefault | Gets the Upgrade parameter name for setting factory default.
Upgrade_Param_FirmwareFile | Gets the Upgrade parameter name for firmware file.
Upgrade_Value_FactoryDefault_No | Gets the Upgrade parameter value for disregarding factory default after an upgrade.
Upgrade_Value_FactoryDefault_Yes | Gets the Upgrade parameter value for setting factory default after an upgrade.
UserManagement_Get_Name | Gets the template function name for getting users using UserManagement.
UserManagement_Param_Password | Gets the UserManagement parameter name for password.
UserManagement_Param_Ptz | Gets the UserManagement parameter name for PTZ control.
UserManagement_Param_Usergroup | Gets the UserManagement parameter name for access level.
UserManagement_Param_Username | Gets the UserManagement parameter name for username.
UserManagement_Remove_Name | Gets the template function name for removing a user using UserManagement.
UserManagement_Set_Name | Gets the template function name for setting a user using UserManagement.
UserManagement_Value_Ptz_No | Gets the UserManagement parameter value for disallowing PTZ control.
UserManagement_Value_Ptz_Yes | Gets the UserManagement parameter value for allowing PTZ control.
UserManagement_Value_Usergroup_Admin | Gets the UserManagement parameter value for access level administrator.
UserManagement_Value_Usergroup_Operator | Gets the UserManagement parameter value for access level operator.
UserManagement_Value_Usergroup_Viewer | Gets the UserManagement parameter value for access level viewer.

See Also

TemplateConst Class | DeviceMgr Namespace | Template | Apply template sample (C#) | Apply template using operation sample (C++)


TemplateConst Properties

The properties of the TemplateConst class are listed below. For a complete list of TemplateConst class members, see the TemplateConst Members topic.

Public Static (Shared) Properties

AssignIP_Name | Gets the template function name for assigning IP and enabling DHCP using AssignIP.
Config_Get_Name | Gets the template function name for getting parameters using Config.
Config_Set_Name | Gets the template function name for setting parameters using Config.
DateTime_Param_Date | Gets the Config parameter name for setting date.
DateTime_Param_Time | Gets the Config parameter name for setting time.
DateTime_Set_Name | Gets the template function name for setting date and time using Config.
DateTime_Value_Date_Today | Gets the Config parameter value for setting the computers date.
DateTime_Value_Time_Now | Gets the Config parameter value for setting the computers time.
FactoryDefault_Name | Gets the template function name for setting factory default using Maintenance.
FactoryDefault_Param_Method | Gets the Maintenance parameter name for which factory default method to use.
FactoryDefault_Value_Method_Hard | Gets the Maintenance parameter value for setting hard factory default, i.e. reset all parameters to original factory settings.
FactoryDefault_Value_Method_Normal | Gets the Maintenance parameter value for setting normal factory default, i.e. reset all parameters, except TCP/IP settings, to original factory settings.
Restart_Name | Gets the template function name for restarting using Maintenance.
Update_Name | Gets the template function name for updating available software from Axis web site using Update.
Upgrade_Name | Gets the template function name for Upgrade.
Upgrade_Param_FactoryDefault | Gets the Upgrade parameter name for setting factory default.
Upgrade_Param_FirmwareFile | Gets the Upgrade parameter name for firmware file.
Upgrade_Value_FactoryDefault_No | Gets the Upgrade parameter value for disregarding factory default after an upgrade.
Upgrade_Value_FactoryDefault_Yes | Gets the Upgrade parameter value for setting factory default after an upgrade.
UserManagement_Get_Name | Gets the template function name for getting users using UserManagement.
UserManagement_Param_Password | Gets the UserManagement parameter name for password.
UserManagement_Param_Ptz | Gets the UserManagement parameter name for PTZ control.
UserManagement_Param_Usergroup | Gets the UserManagement parameter name for access level.
UserManagement_Param_Username | Gets the UserManagement parameter name for username.
UserManagement_Remove_Name | Gets the template function name for removing a user using UserManagement.
UserManagement_Set_Name | Gets the template function name for setting a user using UserManagement.
UserManagement_Value_Ptz_No | Gets the UserManagement parameter value for disallowing PTZ control.
UserManagement_Value_Ptz_Yes | Gets the UserManagement parameter value for allowing PTZ control.
UserManagement_Value_Usergroup_Admin | Gets the UserManagement parameter value for access level administrator.
UserManagement_Value_Usergroup_Operator | Gets the UserManagement parameter value for access level operator.
UserManagement_Value_Usergroup_Viewer | Gets the UserManagement parameter value for access level viewer.

See Also

TemplateConst Class | DeviceMgr Namespace | Template | Apply template sample (C#) | Apply template using operation sample (C++)


AssignIP_Name Property

AXIS Camera Management SDK 2.00

TemplateConst.AssignIP_Name Property

Gets the template function name for assigning IP and enabling DHCP using AssignIP.

[Visual Basic]
Public Shared ReadOnly Property AssignIP_Name As String
[C#]
public static string AssignIP_Name {get;}

Property Value

The template function name for assigning IP and enabling DHCP.

Example

See template sample (C#) or template sample (C++) on how to use the Template methods.

See Also

TemplateConst Class | DeviceMgr Namespace | Template | AssignIP | Apply template sample (C#) | Apply template using operation sample (C++)


Config_Get_Name Property

AXIS Camera Management SDK 2.00

TemplateConst.Config_Get_Name Property

Gets the template function name for getting parameters using Config.

[Visual Basic]
Public Shared ReadOnly Property Config_Get_Name As String
[C#]
public static string Config_Get_Name {get;}

Property Value

The template function name for getting parameters.

Example

See template sample (C#) or template sample (C++) on how to use the Template methods.

See Also

TemplateConst Class | DeviceMgr Namespace | Template | Config | Apply template sample (C#) | Apply template using operation sample (C++)


Config_Set_Name Property

AXIS Camera Management SDK 2.00

TemplateConst.Config_Set_Name Property

Gets the template function name for setting parameters using Config.

[Visual Basic]
Public Shared ReadOnly Property Config_Set_Name As String
[C#]
public static string Config_Set_Name {get;}

Property Value

The template function name for setting parameters.

Example

See template sample (C#) or template sample (C++) on how to use the Template methods.

See Also

TemplateConst Class | DeviceMgr Namespace | Template | Config | Apply template sample (C#) | Apply template using operation sample (C++)


DateTime_Param_Date Property

AXIS Camera Management SDK 2.00

TemplateConst.DateTime_Param_Date Property

Gets the Config parameter name for setting date.

[Visual Basic]
Public Shared ReadOnly Property DateTime_Param_Date As String
[C#]
public static string DateTime_Param_Date {get;}

Property Value

The date parameter name.

Example

See template sample (C#) or template sample (C++) on how to use the Template methods.

See Also

TemplateConst Class | DeviceMgr Namespace | Template | Config | Apply template sample (C#) | Apply template using operation sample (C++)


DateTime_Param_Time Property

AXIS Camera Management SDK 2.00

TemplateConst.DateTime_Param_Time Property

Gets the Config parameter name for setting time.

[Visual Basic]
Public Shared ReadOnly Property DateTime_Param_Time As String
[C#]
public static string DateTime_Param_Time {get;}

Property Value

The time parameter name.

Example

See template sample (C#) or template sample (C++) on how to use the Template methods.

See Also

TemplateConst Class | DeviceMgr Namespace | Template | Config | Apply template sample (C#) | Apply template using operation sample (C++)


DateTime_Set_Name Property

AXIS Camera Management SDK 2.00

TemplateConst.DateTime_Set_Name Property

Gets the template function name for setting date and time using Config.

[Visual Basic]
Public Shared ReadOnly Property DateTime_Set_Name As String
[C#]
public static string DateTime_Set_Name {get;}

Property Value

The template function name for setting date and time.

Example

See template sample (C#) or template sample (C++) on how to use the Template methods.

See Also

TemplateConst Class | DeviceMgr Namespace | Template | Config | Apply template sample (C#) | Apply template using operation sample (C++)


DateTime_Value_Date_Today Property

AXIS Camera Management SDK 2.00

TemplateConst.DateTime_Value_Date_Today Property

Gets the Config parameter value for setting the computers date.

[Visual Basic]
Public Shared ReadOnly Property DateTime_Value_Date_Today As String
[C#]
public static string DateTime_Value_Date_Today {get;}

Property Value

The value for setting the computers date.

Example

See template sample (C#) or template sample (C++) on how to use the Template methods.

See Also

TemplateConst Class | DeviceMgr Namespace | Template | Config | Apply template sample (C#) | Apply template using operation sample (C++)


DateTime_Value_Time_Now Property

AXIS Camera Management SDK 2.00

TemplateConst.DateTime_Value_Time_Now Property

Gets the Config parameter value for setting the computers time.

[Visual Basic]
Public Shared ReadOnly Property DateTime_Value_Time_Now As String
[C#]
public static string DateTime_Value_Time_Now {get;}

Property Value

The value for setting the computers time.

Example

See template sample (C#) or template sample (C++) on how to use the Template methods.

See Also

TemplateConst Class | DeviceMgr Namespace | Template | Config | Apply template sample (C#) | Apply template using operation sample (C++)


FactoryDefault_Name Property

AXIS Camera Management SDK 2.00

TemplateConst.FactoryDefault_Name Property

Gets the template function name for setting factory default using Maintenance.

[Visual Basic]
Public Shared ReadOnly Property FactoryDefault_Name As String
[C#]
public static string FactoryDefault_Name {get;}

Property Value

The template function name for setting factory default.

Example

See template sample (C#) or template sample (C++) on how to use the Template methods.

See Also

TemplateConst Class | DeviceMgr Namespace | Template | Maintenance | Apply template sample (C#) | Apply template using operation sample (C++)


FactoryDefault_Param_Method Property

AXIS Camera Management SDK 2.00

TemplateConst.FactoryDefault_Param_Method Property

Gets the Maintenance parameter name for which factory default method to use.

[Visual Basic]
Public Shared ReadOnly Property FactoryDefault_Param_Method As String
[C#]
public static string FactoryDefault_Param_Method {get;}

Property Value

The factory default method parameter name.

Example

See template sample (C#) or template sample (C++) on how to use the Template methods.

See Also

TemplateConst Class | DeviceMgr Namespace | Template | Maintenance | Apply template sample (C#) | Apply template using operation sample (C++)


FactoryDefault_Value_Method_Hard Property

AXIS Camera Management SDK 2.00

TemplateConst.FactoryDefault_Value_Method_Hard Property

Gets the Maintenance parameter value for setting hard factory default, i.e. reset all parameters to original factory settings.

[Visual Basic]
Public Shared ReadOnly Property FactoryDefault_Value_Method_Hard As String
[C#]
public static string FactoryDefault_Value_Method_Hard {get;}

Property Value

The value for setting hard factory default.

Example

See template sample (C#) or template sample (C++) on how to use the Template methods.

See Also

TemplateConst Class | DeviceMgr Namespace | Template | Maintenance | Apply template sample (C#) | Apply template using operation sample (C++)


FactoryDefault_Value_Method_Normal Property

AXIS Camera Management SDK 2.00

TemplateConst.FactoryDefault_Value_Method_Normal Property

Gets the Maintenance parameter value for setting normal factory default, i.e. reset all parameters, except TCP/IP settings, to original factory settings.

[Visual Basic]
Public Shared ReadOnly Property FactoryDefault_Value_Method_Normal As String
[C#]
public static string FactoryDefault_Value_Method_Normal {get;}

Property Value

The value for setting normal factory default.

Example

See template sample (C#) or template sample (C++) on how to use the Template methods.

See Also

TemplateConst Class | DeviceMgr Namespace | Template | Maintenance | Apply template sample (C#) | Apply template using operation sample (C++)


Restart_Name Property

AXIS Camera Management SDK 2.00

TemplateConst.Restart_Name Property

Gets the template function name for restarting using Maintenance.

[Visual Basic]
Public Shared ReadOnly Property Restart_Name As String
[C#]
public static string Restart_Name {get;}

Property Value

The template function name for restarting a device.

Example

See template sample (C#) or template sample (C++) on how to use the Template methods.

See Also

TemplateConst Class | DeviceMgr Namespace | Template | Maintenance | Apply template sample (C#) | Apply template using operation sample (C++)


Update_Name Property

AXIS Camera Management SDK 2.00

TemplateConst.Update_Name Property

Gets the template function name for updating available software from Axis web site using Update.

[Visual Basic]
Public Shared ReadOnly Property Update_Name As String
[C#]
public static string Update_Name {get;}

Property Value

The template function name for updating available software from Axis web.

Example

See template sample (C#) or template sample (C++) on how to use the Template methods.

See Also

TemplateConst Class | DeviceMgr Namespace | Template | Update | Apply template sample (C#) | Apply template using operation sample (C++)


Upgrade_Name Property

AXIS Camera Management SDK 2.00

TemplateConst.Upgrade_Name Property

Gets the template function name for Upgrade.

[Visual Basic]
Public Shared ReadOnly Property Upgrade_Name As String
[C#]
public static string Upgrade_Name {get;}

Property Value

The template function name for upgrading.

Example

See template sample (C#) or template sample (C++) on how to use the Template methods.

See Also

TemplateConst Class | DeviceMgr Namespace | Template | Upgrade | Apply template sample (C#) | Apply template using operation sample (C++)


Upgrade_Param_FactoryDefault Property

AXIS Camera Management SDK 2.00

TemplateConst.Upgrade_Param_FactoryDefault Property

Gets the Upgrade parameter name for setting factory default.

[Visual Basic]
Public Shared ReadOnly Property Upgrade_Param_FactoryDefault As String
[C#]
public static string Upgrade_Param_FactoryDefault {get;}

Property Value

The factory default parameter name.

Example

See template sample (C#) or template sample (C++) on how to use the Template methods.

See Also

TemplateConst Class | DeviceMgr Namespace | Template | Upgrade | Apply template sample (C#) | Apply template using operation sample (C++)


Upgrade_Param_FirmwareFile Property

AXIS Camera Management SDK 2.00

TemplateConst.Upgrade_Param_FirmwareFile Property

Gets the Upgrade parameter name for firmware file.

[Visual Basic]
Public Shared ReadOnly Property Upgrade_Param_FirmwareFile As String
[C#]
public static string Upgrade_Param_FirmwareFile {get;}

Property Value

The firmware file parameter name.

Example

See template sample (C#) or template sample (C++) on how to use the Template methods.

See Also

TemplateConst Class | DeviceMgr Namespace | Template | Upgrade | Apply template sample (C#) | Apply template using operation sample (C++)


Upgrade_Value_FactoryDefault_No Property

AXIS Camera Management SDK 2.00

TemplateConst.Upgrade_Value_FactoryDefault_No Property

Gets the Upgrade parameter value for disregarding factory default after an upgrade.

[Visual Basic]
Public Shared ReadOnly Property Upgrade_Value_FactoryDefault_No As String
[C#]
public static string Upgrade_Value_FactoryDefault_No {get;}

Property Value

Disregards factory default after an upgrade.

Example

See template sample (C#) or template sample (C++) on how to use the Template methods.

See Also

TemplateConst Class | DeviceMgr Namespace | Template | Upgrade | Apply template sample (C#) | Apply template using operation sample (C++)


Upgrade_Value_FactoryDefault_Yes Property

AXIS Camera Management SDK 2.00

TemplateConst.Upgrade_Value_FactoryDefault_Yes Property

Gets the Upgrade parameter value for setting factory default after an upgrade.

[Visual Basic]
Public Shared ReadOnly Property Upgrade_Value_FactoryDefault_Yes As String
[C#]
public static string Upgrade_Value_FactoryDefault_Yes {get;}

Property Value

Sets factory default after an upgrade.

Example

See template sample (C#) or template sample (C++) on how to use the Template methods.

See Also

TemplateConst Class | DeviceMgr Namespace | Template | Upgrade | Apply template sample (C#) | Apply template using operation sample (C++)


UserManagement_Get_Name Property

AXIS Camera Management SDK 2.00

TemplateConst.UserManagement_Get_Name Property

Gets the template function name for getting users using UserManagement.

[Visual Basic]
Public Shared ReadOnly Property UserManagement_Get_Name As String
[C#]
public static string UserManagement_Get_Name {get;}

Property Value

The template function name for getting users.

Example

See template sample (C#) or template sample (C++) on how to use the Template methods.

See Also

TemplateConst Class | DeviceMgr Namespace | Template | UserManagement | Apply template sample (C#) | Apply template using operation sample (C++)


UserManagement_Param_Password Property

AXIS Camera Management SDK 2.00

TemplateConst.UserManagement_Param_Password Property

Gets the UserManagement parameter name for password.

[Visual Basic]
Public Shared ReadOnly Property UserManagement_Param_Password As String
[C#]
public static string UserManagement_Param_Password {get;}

Property Value

The password parameter name.

Example

See template sample (C#) or template sample (C++) on how to use the Template methods.

See Also

TemplateConst Class | DeviceMgr Namespace | Template | UserManagement | Apply template sample (C#) | Apply template using operation sample (C++)


UserManagement_Param_Ptz Property

AXIS Camera Management SDK 2.00

TemplateConst.UserManagement_Param_Ptz Property

Gets the UserManagement parameter name for PTZ control.

[Visual Basic]
Public Shared ReadOnly Property UserManagement_Param_Ptz As String
[C#]
public static string UserManagement_Param_Ptz {get;}

Property Value

The PTZ control parameter name.

Example

See template sample (C#) or template sample (C++) on how to use the Template methods.

See Also

TemplateConst Class | DeviceMgr Namespace | Template | UserManagement | Apply template sample (C#) | Apply template using operation sample (C++)


UserManagement_Param_Usergroup Property

AXIS Camera Management SDK 2.00

TemplateConst.UserManagement_Param_Usergroup Property

Gets the UserManagement parameter name for access level.

[Visual Basic]
Public Shared ReadOnly Property UserManagement_Param_Usergroup As String
[C#]
public static string UserManagement_Param_Usergroup {get;}

Property Value

The access level parameter name.

Example

See template sample (C#) or template sample (C++) on how to use the Template methods.

See Also

TemplateConst Class | DeviceMgr Namespace | Template | UserManagement | Apply template sample (C#) | Apply template using operation sample (C++)


UserManagement_Param_Username Property

AXIS Camera Management SDK 2.00

TemplateConst.UserManagement_Param_Username Property

Gets the UserManagement parameter name for username.

[Visual Basic]
Public Shared ReadOnly Property UserManagement_Param_Username As String
[C#]
public static string UserManagement_Param_Username {get;}

Property Value

The username parameter name.

Example

See template sample (C#) or template sample (C++) on how to use the Template methods.

See Also

TemplateConst Class | DeviceMgr Namespace | Template | UserManagement | Apply template sample (C#) | Apply template using operation sample (C++)


UserManagement_Remove_Name Property

AXIS Camera Management SDK 2.00

TemplateConst.UserManagement_Remove_Name Property

Gets the template function name for removing a user using UserManagement.

[Visual Basic]
Public Shared ReadOnly Property UserManagement_Remove_Name As String
[C#]
public static string UserManagement_Remove_Name {get;}

Property Value

The template function name for removing a user.

Example

See template sample (C#) or template sample (C++) on how to use the Template methods.

See Also

TemplateConst Class | DeviceMgr Namespace | Template | UserManagement | Apply template sample (C#) | Apply template using operation sample (C++)


UserManagement_Set_Name Property

AXIS Camera Management SDK 2.00

TemplateConst.UserManagement_Set_Name Property

Gets the template function name for setting a user using UserManagement.

[Visual Basic]
Public Shared ReadOnly Property UserManagement_Set_Name As String
[C#]
public static string UserManagement_Set_Name {get;}

Property Value

The template function name for setting a user.

Example

See template sample (C#) or template sample (C++) on how to use the Template methods.

See Also

TemplateConst Class | DeviceMgr Namespace | Template | UserManagement | Apply template sample (C#) | Apply template using operation sample (C++)


UserManagement_Value_Ptz_No Property

AXIS Camera Management SDK 2.00

TemplateConst.UserManagement_Value_Ptz_No Property

Gets the UserManagement parameter value for disallowing PTZ control.

[Visual Basic]
Public Shared ReadOnly Property UserManagement_Value_Ptz_No As String
[C#]
public static string UserManagement_Value_Ptz_No {get;}

Property Value

PTZ control is not allowed.

Example

See template sample (C#) or template sample (C++) on how to use the Template methods.

See Also

TemplateConst Class | DeviceMgr Namespace | Template | UserManagement | Apply template sample (C#) | Apply template using operation sample (C++)


UserManagement_Value_Ptz_Yes Property

AXIS Camera Management SDK 2.00

TemplateConst.UserManagement_Value_Ptz_Yes Property

Gets the UserManagement parameter value for allowing PTZ control.

[Visual Basic]
Public Shared ReadOnly Property UserManagement_Value_Ptz_Yes As String
[C#]
public static string UserManagement_Value_Ptz_Yes {get;}

Property Value

PTZ control is allowed.

Example

See template sample (C#) or template sample (C++) on how to use the Template methods.

See Also

TemplateConst Class | DeviceMgr Namespace | Template | UserManagement | Apply template sample (C#) | Apply template using operation sample (C++)


UserManagement_Value_Usergroup_Admin Property

AXIS Camera Management SDK 2.00

TemplateConst.UserManagement_Value_Usergroup_Admin Property

Gets the UserManagement parameter value for access level administrator.

[Visual Basic]
Public Shared ReadOnly Property UserManagement_Value_Usergroup_Admin As String
[C#]
public static string UserManagement_Value_Usergroup_Admin {get;}

Property Value

The administrator access level.

Example

See template sample (C#) or template sample (C++) on how to use the Template methods.

See Also

TemplateConst Class | DeviceMgr Namespace | Template | UserManagement | Apply template sample (C#) | Apply template using operation sample (C++)


UserManagement_Value_Usergroup_Operator Property

AXIS Camera Management SDK 2.00

TemplateConst.UserManagement_Value_Usergroup_Operator Property

Gets the UserManagement parameter value for access level operator.

[Visual Basic]
Public Shared ReadOnly Property UserManagement_Value_Usergroup_Operator As String
[C#]
public static string UserManagement_Value_Usergroup_Operator {get;}

Property Value

The operator access level.

Example

See template sample (C#) or template sample (C++) on how to use the Template methods.

See Also

TemplateConst Class | DeviceMgr Namespace | Template | UserManagement | Apply template sample (C#) | Apply template using operation sample (C++)


UserManagement_Value_Usergroup_Viewer Property

AXIS Camera Management SDK 2.00

TemplateConst.UserManagement_Value_Usergroup_Viewer Property

Gets the UserManagement parameter value for access level viewer.

[Visual Basic]
Public Shared ReadOnly Property UserManagement_Value_Usergroup_Viewer As String
[C#]
public static string UserManagement_Value_Usergroup_Viewer {get;}

Property Value

The viewer access level.

Example

See template sample (C#) or template sample (C++) on how to use the Template methods.

See Also

TemplateConst Class | DeviceMgr Namespace | Template | UserManagement | Apply template sample (C#) | Apply template using operation sample (C++)


Update Class

Used when downloading available software updates from Axis web site.

For a list of all members of this type, see Update Members.

System.Object
DeviceMgr.Update

[Visual Basic]
Public Class Update
[C#]
public class Update

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

Note In order to have access to software from Axis web site, an Internet connection and a registered MyAxis account is required. Click here to register.

This class is part of a group of related classes used to query www.axis.com for available firmware updates.

The BeginGetAvailableSoftware method in the Update class is used to check for available firmware updates at www.axis.com and returns AvailableSoftware objects. AvailableSoftware contains a ProductList, which contains the list of available Product updates. Each Product has a name like e.g. "AXIS 211" and contains a SoftwareList, which is a list of available software (i.e. firmware files) for that product model. Each Software has a SoftwareVersion, e.g. 4.40.

With an AvailableSoftware object returned from the Update class it is possible to get the list of available firmware files (Software objects). These Software objects are then specified when downloading available software using the BeginDownload method in the Update class.

Example

See update sample (C#) on how to use the methods.

Requirements

Namespace: DeviceMgr

Assembly: DeviceMgr (in DeviceMgr.dll)

See Also

Update Members | DeviceMgr Namespace | Update sample (C#) | The Asynchronous Pattern | Register MyAxis Account


Update Members

Update overview

Public Static (Shared) Methods

AddDownload | Adds the function to download a specific software to an existing Operation.
AddGetAvailableSoftware | Adds the function to update available software to an existing Operation.
GetAvailableSoftware | Overloaded. Extracts the available software from a Result after performing update.

Public Instance Constructors

Update Constructor Initializes a new instance of the Update class.

Public Instance Methods

BeginDownload | Begins an asynchronous request for downloading a specific software.
BeginGetAvailableSoftware | Begins an asynchronous request for updating available software from Axis web site.
Cancel | Cancels an operation. Does not wait for the cancel to complete. Use End methods for waiting.
Download | Downloads specific software and saves it to a specified path.
EndDownload | Waits for BeginDownload to end and returns the Result.
EndGetAvailableSoftware | Overloaded. Waits for BeginGetAvailableSoftware to end and returns the available software.
GetAvailableSoftware | Overloaded. Contacts Axis web site and retrieves the available software.

Public Instance Events

ProgressUpdate Progress event during a BeginDownload, BeginGetAvailableSoftware, Download and GetAvailableSoftware requests.

See Also

Update Class | DeviceMgr Namespace | Update sample (C#) | The Asynchronous Pattern | Register MyAxis Account


Update Constructor

Initializes a new instance of the Update class.

[Visual Basic]
Public Sub New()
[C#]
public Update();

Example

See update sample (C#) on how to use the methods.

See Also

Update Class | DeviceMgr Namespace | Update sample (C#) | Register MyAxis Account


Update Methods

The methods of the Update class are listed below. For a complete list of Update class members, see the Update Members topic.

Public Static (Shared) Methods

AddDownload | Adds the function to download a specific software to an existing Operation.
AddGetAvailableSoftware | Adds the function to update available software to an existing Operation.
GetAvailableSoftware | Overloaded. Extracts the available software from a Result after performing update.

Public Instance Methods

BeginDownload | Begins an asynchronous request for downloading a specific software.
BeginGetAvailableSoftware | Begins an asynchronous request for updating available software from Axis web site.
Cancel | Cancels an operation. Does not wait for the cancel to complete. Use End methods for waiting.
Download | Downloads specific software and saves it to a specified path.
EndDownload | Waits for BeginDownload to end and returns the Result.
EndGetAvailableSoftware | Overloaded. Waits for BeginGetAvailableSoftware to end and returns the available software.
GetAvailableSoftware | Overloaded. Contacts Axis web site and retrieves the available software.

See Also

Update Class | DeviceMgr Namespace | Update sample (C#) | The Asynchronous Pattern | Register MyAxis Account


Update.AddDownload Method

Adds the function to download a specific software to an existing Operation.

[Visual Basic]
Public Shared Sub AddDownload( _
ByVal operation As Operation, _
ByVal software As Software, _
ByVal saveFilePath As String, _
ByVal userName As String, _
ByVal password As String, _
ByVal state As Object _
)
[C#]
public static void AddDownload(
Operation operation,
Software software,
string saveFilePath,
string userName,
string password,
object state
);

Parameters

operation
The operation this function is added to.
software
The software describing which software to download from Axis web site.
saveFilePath
The file name of the downloaded software when saved on disk.
userName
The user name (i.e. e-mail address) used when accessing MyAxis on the web.
password
The password used when accessing MyAxis on the web.
state
A user provided object that is passed to the method invoked when the asynchronous operation completes or in the result and can e.g. contain user state information.

Remarks

Note In order to have access to software from Axis web site, an Internet connection and a registered MyAxis account is required. Click here to register.

Example

See update sample (C#) on how to use the methods.

See Also

Update Class | DeviceMgr Namespace | Update sample (C#) | Register MyAxis Account


Update.AddGetAvailableSoftware Method

Adds the function to update available software to an existing Operation.

[Visual Basic]
Public Shared Sub AddGetAvailableSoftware( _
ByVal operation As Operation, _
ByVal userName As String, _
ByVal password As String, _
ByVal state As Object _
)
[C#]
public static void AddGetAvailableSoftware(
Operation operation,
string userName,
string password,
object state
);

Parameters

operation
The operation this function is added to.
userName
The user name (i.e. e-mail address) used when accessing MyAxis on the web.
password
The password used when accessing MyAxis on the web.
state
A user provided object that is passed to the method invoked when the asynchronous operation completes or in the result and can e.g. contain user state information.

Remarks

Note In order to have access to software from Axis web site, an Internet connection and a registered MyAxis account is required. Click here to register.

Example

See update sample (C#) on how to use the methods.

See Also

Update Class | DeviceMgr Namespace | Update sample (C#) | Register MyAxis Account


Update.BeginDownload Method

Begins an asynchronous request for downloading a specific software.

[Visual Basic]
Public Function BeginDownload( _
ByVal software As Software, _
ByVal saveFilePath As String, _
ByVal userName As String, _
ByVal password As String, _
ByVal callback As AsyncCallback, _
ByVal state As Object _
) As IAsyncResult
[C#]
public IAsyncResult BeginDownload(
Software software,
string saveFilePath,
string userName,
string password,
AsyncCallback callback,
object state
);

Parameters

software
The software to download from Axis web site.
saveFilePath
The file name of the downloaded software when saved on disk.
userName
The user name (i.e. e-mail address) used when accessing MyAxis on the web.
password
The password used when accessing MyAxis on the web.
callback
The AsyncCallback delegate.
state
A user provided object that is passed to the method invoked when the asynchronous operation completes or in the result and can e.g. contain user state information.

Return Value

An IAsyncResult that references the asynchronous request.

Remarks

The BeginDownload method starts an asynchronous request for downloading a specific software. The callback method that implements the AsyncCallback delegate uses the EndDownload method to return the Result.

Note In order to have access to software from Axis web site, an Internet connection and a registered MyAxis account is required. Click here to register.

Example

See update sample (C#) on how to use the methods.

See Also

Update Class | DeviceMgr Namespace | Update sample (C#) | The Asynchronous Pattern | Register MyAxis Account


Update.BeginGetAvailableSoftware Method

Begins an asynchronous request for updating available software from Axis web site.

[Visual Basic]
Public Function BeginGetAvailableSoftware( _
ByVal userName As String, _
ByVal password As String, _
ByVal callback As AsyncCallback, _
ByVal state As Object _
) As IAsyncResult
[C#]
public IAsyncResult BeginGetAvailableSoftware(
string userName,
string password,
AsyncCallback callback,
object state
);

Parameters

userName
The user name (i.e. e-mail address) used when accessing MyAxis on the web.
password
The password used when accessing MyAxis on the web.
callback
The AsyncCallback delegate.
state
A user provided object that is passed to the method invoked when the asynchronous operation completes or in the result and can e.g. contain user state information.

Return Value

An IAsyncResult that references the asynchronous request.

Remarks

The BeginGetAvailableSoftware method starts an asynchronous request for updating available software from Axis web site. The callback method that implements the AsyncCallback delegate uses the EndGetAvailableSoftware method to return the available software.

Note In order to have access to software from Axis web site, an Internet connection and a registered MyAxis account is required. Click here to register.

Example

See update sample (C#) on how to use the methods.

See Also

Update Class | DeviceMgr Namespace | Update sample (C#) | The Asynchronous Pattern | Register MyAxis Account


Update.Cancel Method

Cancels an operation. Does not wait for the cancel to complete. Use End methods for waiting.

[Visual Basic]
Public Sub Cancel( _
ByVal ar As IAsyncResult _
)
[C#]
public void Cancel(
IAsyncResult ar
);

Parameters

ar
The IAsyncResult handle returned by the corresponding Begin method.

Remarks

A Cancel call will not block and wait for the request to be canceled. Use asyncResult.AsyncWaitHandle.WaitOne(); or corresponding End method to wait for the request to be canceled or completed.

The returned values in the case of a subsequent corresponding End method depends on the timing of the Cancel call.

Note Canceling an ongoing request may produce an undefined result. For example, depending on the timing of the Cancel call, the request may have finished before the call could cancel it. Or in the case of an upgrade request, the firmware file may have been sent to the device, which will continue the upgrade even if the connection is disconnected by a cancel.

Example

See update sample (C#) on how to use the methods.

See Also

Update Class | DeviceMgr Namespace | Update sample (C#) | The Asynchronous Pattern | Register MyAxis Account


Update.Download Method

Downloads specific software and saves it to a specified path.

[Visual Basic]
Public Function Download( _
ByVal software As Software, _
ByVal saveFilePath As String, _
ByVal userName As String, _
ByVal password As String _
) As Result
[C#]
public Result Download(
Software software,
string saveFilePath,
string userName,
string password
);

Parameters

software
The software describing which software to download from Axis web site.
saveFilePath
The file name of the downloaded software when saved on disk.
userName
The user name (i.e. e-mail address) used when accessing MyAxis on the web.
password
The password used when accessing MyAxis on the web.

Return Value

The Result describing the function status.

Remarks

Note In order to have access to software from Axis web site, an Internet connection and a registered MyAxis account is required. Click here to register.

Example

See update sample (C#) on how to use the methods.

See Also

Update Class | DeviceMgr Namespace | Update sample (C#) | Register MyAxis Account


Update.EndDownload Method

Waits for BeginDownload to end and returns the Result.

[Visual Basic]
Public Function EndDownload( _
ByVal ar As IAsyncResult _
) As Result
[C#]
public Result EndDownload(
IAsyncResult ar
);

Parameters

ar
The IAsyncResult handle returned by the corresponding Begin method.

Return Value

The Result describing the function status.

Example

See update sample (C#) on how to use the methods.

See Also

Update Class | DeviceMgr Namespace | Update sample (C#) | The Asynchronous Pattern | Register MyAxis Account


EndGetAvailableSoftware Method

AXIS Camera Management SDK 2.00

Update.EndGetAvailableSoftware Method

Waits for BeginGetAvailableSoftware to end and returns the available software.

Overload List

Waits for BeginGetAvailableSoftware to end and returns the available software.

public AvailableSoftware EndGetAvailableSoftware(IAsyncResult);

Waits for BeginGetAvailableSoftware to end and returns the available software and the Result.

public AvailableSoftware EndGetAvailableSoftware(IAsyncResult,out Result);

See Also

Update Class | DeviceMgr Namespace | Update sample (C#) | The Asynchronous Pattern | Register MyAxis Account


Update.EndGetAvailableSoftware Method (IAsyncResult)

Waits for BeginGetAvailableSoftware to end and returns the available software.

[Visual Basic]
Overloads Public Function EndGetAvailableSoftware( _
ByVal ar As IAsyncResult _
) As AvailableSoftware
[C#]
public AvailableSoftware EndGetAvailableSoftware(
IAsyncResult ar
);

Parameters

ar
The IAsyncResult handle returned by the corresponding Begin method.

Return Value

A list of available software from Axis web site if Update was successful; otherwise null.

Example

See update sample (C#) on how to use the methods.

See Also

Update Class | DeviceMgr Namespace | Update.EndGetAvailableSoftware Overload List | Update sample (C#) | The Asynchronous Pattern | Register MyAxis Account


Update.EndGetAvailableSoftware Method (IAsyncResult, Result)

Waits for BeginGetAvailableSoftware to end and returns the available software and the Result.

[Visual Basic]
Overloads Public Function EndGetAvailableSoftware( _
ByVal ar As IAsyncResult, _
ByRef result As Result _
) As AvailableSoftware
[C#]
public AvailableSoftware EndGetAvailableSoftware(
IAsyncResult ar,
out Result result
);

Parameters

ar
The IAsyncResult handle returned by the corresponding Begin method.
result
The Result describing the function status.

Return Value

A list of available software from Axis web site if Update was successful; otherwise null, and the Result.

Example

See update sample (C#) on how to use the methods.

See Also

Update Class | DeviceMgr Namespace | Update.EndGetAvailableSoftware Overload List | Update sample (C#) | The Asynchronous Pattern | Register MyAxis Account


GetAvailableSoftware Method

AXIS Camera Management SDK 2.00

Update.GetAvailableSoftware Method

Extracts the available software from a Result after performing update.

Overload List

Extracts the available software from a Result after performing update.

public static AvailableSoftware GetAvailableSoftware(Result);

Contacts Axis web site and retrieves the available software.

public AvailableSoftware GetAvailableSoftware(string,string);

See Also

Update Class | DeviceMgr Namespace | Update sample (C#) | Register MyAxis Account


Update.GetAvailableSoftware Method (Result)

Extracts the available software from a Result after performing update.

[Visual Basic]
Overloads Public Shared Function GetAvailableSoftware( _
ByVal result As Result _
) As AvailableSoftware
[C#]
public static AvailableSoftware GetAvailableSoftware(
Result result
);

Parameters

result
The Result describing the function status.

Return Value

A list of available software from Axis web site if Update was successful; otherwise null.

Example

See update sample (C#) on how to use the methods.

See Also

Update Class | DeviceMgr Namespace | Update.GetAvailableSoftware Overload List | Update sample (C#) | Register MyAxis Account


Update.GetAvailableSoftware Method (String, String)

Contacts Axis web site and retrieves the available software.

[Visual Basic]
Overloads Public Function GetAvailableSoftware( _
ByVal userName As String, _
ByVal password As String _
) As AvailableSoftware
[C#]
public AvailableSoftware GetAvailableSoftware(
string userName,
string password
);

Parameters

userName
The user name (i.e. e-mail address) used when accessing MyAxis on the web.
password
The password used when accessing MyAxis on the web.

Return Value

A list of available software if Update was successful; otherwise null.

Remarks

Note In order to have access to software from Axis web site, an Internet connection and a registered MyAxis account is required. Click here to register.

Example

See update sample (C#) on how to use the methods.

See Also

Update Class | DeviceMgr Namespace | Update.GetAvailableSoftware Overload List | Update sample (C#) | Register MyAxis Account


Update Events

The events of the Update class are listed below. For a complete list of Update class members, see the Update Members topic.

Public Instance Events

ProgressUpdate Progress event during a BeginDownload, BeginGetAvailableSoftware, Download and GetAvailableSoftware requests.

See Also

Update Class | DeviceMgr Namespace | Update sample (C#) | The Asynchronous Pattern | Register MyAxis Account


Update.ProgressUpdate Event

Progress event during a BeginDownload, BeginGetAvailableSoftware, Download and GetAvailableSoftware requests.

[Visual Basic]
Public Event ProgressUpdate As ProgressEventHandler
[C#]
public event ProgressEventHandler ProgressUpdate;

Event Data

The event handler receives an argument of type ProgressEventArgs containing data related to this event. The following ProgressEventArgs properties provide information specific to this event.

Property | Description
AsyncState | Gets an object containing information about the ProgressEventArgs.
Progress | Gets the progress percent.

Example

See update sample (C#) on how to use the methods.

See Also

Update Class | DeviceMgr Namespace | Update sample (C#)


Upgrade Class

Used when upgrading firmware in an Axis device on the network.

For a list of all members of this type, see Upgrade Members.

System.Object
DeviceMgr.Upgrade

[Visual Basic]
Public Class Upgrade
[C#]
public class Upgrade

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

An upgrade goes through several phases and progress is reported throughout the duration in the ProgressUpdate event. First the existence of the firmware file is verified. Then a connection is established with the device and the firmware file is transferred to the devise. The device will now upgrade the old firmware with the new file for a few minutes. After the upgrade, the device reboots and will not respond to any network connections for up to 90 seconds.

If a factory default upgrade is performed, all parameters are set to factory default. The IP address is obtained via DHCP and may have been changed depending on the configuration of the DHCP server. On networks with no DHCP server the new IP address will be 192.168.0.90.

Example

See upgrade sample (C#) and upgrade sample (C++) on how to use the Upgrade methods.

Requirements

Namespace: DeviceMgr

Assembly: DeviceMgr (in DeviceMgr.dll)

See Also

Upgrade Members | DeviceMgr Namespace | Upgrade sample (C#) | Upgrade sample (C++) | The Asynchronous Pattern | Axis Firmware Download


Upgrade Members

Upgrade overview

Public Static (Shared) Methods

AddUpgrade | Adds the function to upgrade a device to an existing Operation.
GetFirmwareVersion | Extracts the firmware version from a Result after upgrading a device.

Public Instance Constructors

Upgrade Constructor Initializes a new instance of the Upgrade class.

Public Instance Methods

BeginUpgrade | Begins an asynchronous request for upgrading a device with a specific firmware.
Cancel | Cancels asynchronous requests started with the BeginUpgrade method.
EndUpgrade | Overloaded. Waits for BeginUpgrade to end and returns the new firmware version and the Result.

Public Instance Events

ProgressUpdate Progress event during a BeginUpgrade request.

See Also

Upgrade Class | DeviceMgr Namespace | Upgrade sample (C#) | Upgrade sample (C++) | The Asynchronous Pattern | Axis Firmware Download


Upgrade Constructor

Initializes a new instance of the Upgrade class.

[Visual Basic]
Public Sub New()
[C#]
public Upgrade();

Example

See upgrade sample (C#) and upgrade sample (C++) on how to use the Upgrade methods.

See Also

Upgrade Class | DeviceMgr Namespace | Upgrade sample (C#) | Upgrade sample (C++)


Upgrade Methods

The methods of the Upgrade class are listed below. For a complete list of Upgrade class members, see the Upgrade Members topic.

Public Static (Shared) Methods

AddUpgrade | Adds the function to upgrade a device to an existing Operation.
GetFirmwareVersion | Extracts the firmware version from a Result after upgrading a device.

Public Instance Methods

BeginUpgrade | Begins an asynchronous request for upgrading a device with a specific firmware.
Cancel | Cancels asynchronous requests started with the BeginUpgrade method.
EndUpgrade | Overloaded. Waits for BeginUpgrade to end and returns the new firmware version and the Result.

See Also

Upgrade Class | DeviceMgr Namespace | Upgrade sample (C#) | Upgrade sample (C++) | The Asynchronous Pattern | Axis Firmware Download


Upgrade.AddUpgrade Method

Adds the function to upgrade a device to an existing Operation.

[Visual Basic]
Public Shared Sub AddUpgrade( _
ByVal operation As Operation, _
ByVal connectionInfo As ConnectionInfo, _
ByVal filePath As String, _
ByVal isFactoryDefault As Boolean, _
ByVal state As Object _
)
[C#]
public static void AddUpgrade(
Operation operation,
ConnectionInfo connectionInfo,
string filePath,
bool isFactoryDefault,
object state
);

Parameters

operation
The operation this function is added to.
connectionInfo
The connection info used when accessing the device.
filePath
The path to the new firmware file.
isFactoryDefault
true to perform factory default after upgrade; false to restore parameters.
state
A user provided object that is passed to the method invoked when the asynchronous operation completes or in the result and can e.g. contain user state information.

Example

See upgrade sample (C#) and upgrade sample (C++) on how to use the Upgrade methods.

See Also

Upgrade Class | DeviceMgr Namespace | Upgrade sample (C#) | Upgrade sample (C++) | Axis Firmware Download


Upgrade.BeginUpgrade Method

Begins an asynchronous request for upgrading a device with a specific firmware.

[Visual Basic]
Public Function BeginUpgrade( _
ByVal connectionInfo As ConnectionInfo, _
ByVal filePath As String, _
ByVal isFactoryDefault As Boolean, _
ByVal callback As AsyncCallback, _
ByVal state As Object _
) As IAsyncResult
[C#]
public IAsyncResult BeginUpgrade(
ConnectionInfo connectionInfo,
string filePath,
bool isFactoryDefault,
AsyncCallback callback,
object state
);

Parameters

connectionInfo
The connection info used when accessing the device.
filePath
The path to the new firmware file.
isFactoryDefault
true to perform factory default after upgrade; false to restore parameters.
callback
The AsyncCallback delegate.
state
A user provided object that is passed to the method invoked when the asynchronous operation completes or in the result and can e.g. contain user state information.

Return Value

An IAsyncResult that references the asynchronous request.

Remarks

The BeginUpgrade method starts an asynchronous request for upgrading a device with a specific firmware. The callback method that implements the AsyncCallback delegate uses the EndUpgrade method to return the new firmware version.

Example

See upgrade sample (C#) and upgrade sample (C++) on how to use the Upgrade methods.

See Also

Upgrade Class | DeviceMgr Namespace | Upgrade sample (C#) | Upgrade sample (C++) | The Asynchronous Pattern | Axis Firmware Download


Upgrade.Cancel Method

Cancels asynchronous requests started with the BeginUpgrade method.

[Visual Basic]
Public Sub Cancel( _
ByVal ar As IAsyncResult _
)
[C#]
public void Cancel(
IAsyncResult ar
);

Parameters

ar
The IAsyncResult handle returned by the corresponding Begin method.

Remarks

A Cancel call will not block and wait for the request to be canceled. Use asyncResult.AsyncWaitHandle.WaitOne(); or corresponding End method to wait for the request to be canceled or completed.

The returned values in the case of a subsequent corresponding End method depends on the timing of the Cancel call.

Note Canceling an ongoing request may produce an undefined result. For example, depending on the timing of the Cancel call, the request may have finished before the call could cancel it. Or in the case of an upgrade request, the firmware file may have been sent to the device, which will continue the upgrade even if the connection is disconnected by a cancel.

Example

See upgrade sample (C#) and upgrade sample (C++) on how to use the Upgrade methods.

See Also

Upgrade Class | DeviceMgr Namespace | Upgrade sample (C#) | Upgrade sample (C++) | The Asynchronous Pattern | Axis Firmware Download


EndUpgrade Method

AXIS Camera Management SDK 2.00

Upgrade.EndUpgrade Method

Waits for BeginUpgrade to end and returns the new firmware version.

Overload List

Waits for BeginUpgrade to end and returns the new firmware version.

public string EndUpgrade(IAsyncResult);

Waits for BeginUpgrade to end and returns the new firmware version and the Result.

public string EndUpgrade(IAsyncResult,out Result);

See Also

Upgrade Class | DeviceMgr Namespace | Upgrade sample (C#) | Upgrade sample (C++) | The Asynchronous Pattern | Axis Firmware Download


Upgrade.EndUpgrade Method (IAsyncResult)

Waits for BeginUpgrade to end and returns the new firmware version.

[Visual Basic]
Overloads Public Function EndUpgrade( _
ByVal ar As IAsyncResult _
) As String
[C#]
public string EndUpgrade(
IAsyncResult ar
);

Parameters

ar
The IAsyncResult handle returned by the corresponding Begin method.

Return Value

The new firmware version if the upgrade is successful and a reconnection could be performed. If no reconnection could be done, e.g. for factory default, the String is "?". Null is returned if the upgrade was unsuccessful.

Example

See upgrade sample (C#) and upgrade sample (C++) on how to use the Upgrade methods.

See Also

Upgrade Class | DeviceMgr Namespace | Upgrade.EndUpgrade Overload List | Upgrade sample (C#) | Upgrade sample (C++) | The Asynchronous Pattern | Axis Firmware Download


Upgrade.EndUpgrade Method (IAsyncResult, Result)

Waits for BeginUpgrade to end and returns the new firmware version and the Result.

[Visual Basic]
Overloads Public Function EndUpgrade( _
ByVal ar As IAsyncResult, _
ByRef result As Result _
) As String
[C#]
public string EndUpgrade(
IAsyncResult ar,
out Result result
);

Parameters

ar
The IAsyncResult handle returned by the corresponding Begin method.
result
The Result describing the function status.

Return Value

The new firmware version if the upgrade is successful and a reconnection could be performed. If no reconnection could be done, e.g. for factory default, the String is "?". Null is returned if the upgrade was not successful.

Example

See upgrade sample (C#) and upgrade sample (C++) on how to use the Upgrade methods.

See Also

Upgrade Class | DeviceMgr Namespace | Upgrade.EndUpgrade Overload List | Upgrade sample (C#) | Upgrade sample (C++) | The Asynchronous Pattern | Axis Firmware Download


Upgrade.GetFirmwareVersion Method

Extracts the firmware version from a Result after upgrading a device.

[Visual Basic]
Public Shared Function GetFirmwareVersion( _
ByVal result As Result _
) As String
[C#]
public static string GetFirmwareVersion(
Result result
);

Parameters

result
The Result describing the function status.

Return Value

The new firmware version if the upgrade is successful and a reconnection could be performed. If no reconnection could be done, e.g. for factory default, the String is "?". Null is returned if the upgrade was unsuccessful.

Example

See upgrade sample (C#) and upgrade sample (C++) on how to use the Upgrade methods.

See Also

Upgrade Class | DeviceMgr Namespace | Upgrade sample (C#) | Upgrade sample (C++) | Axis Firmware Download


Upgrade Events

The events of the Upgrade class are listed below. For a complete list of Upgrade class members, see the Upgrade Members topic.

Public Instance Events

ProgressUpdate Progress event during a BeginUpgrade request.

See Also

Upgrade Class | DeviceMgr Namespace | Upgrade sample (C#) | Upgrade sample (C++) | The Asynchronous Pattern | Axis Firmware Download


Upgrade.ProgressUpdate Event

Progress event during a BeginUpgrade request.

[Visual Basic]
Public Event ProgressUpdate As ProgressEventHandler
[C#]
public event ProgressEventHandler ProgressUpdate;

Event Data

The event handler receives an argument of type ProgressEventArgs containing data related to this event. The following ProgressEventArgs properties provide information specific to this event.

Property | Description
AsyncState | Gets an object containing information about the ProgressEventArgs.
Progress | Gets the progress percent.

Example

See upgrade sample (C#) and upgrade sample (C++) on how to use the Upgrade methods.

See Also

Upgrade Class | DeviceMgr Namespace | Upgrade sample (C#) | Upgrade sample (C++)


User Class

Describes a user in an Axis device and is employed when adding or getting users via UserManagement.

For a list of all members of this type, see User Members.

System.Object
DeviceMgr.User

[Visual Basic]
Public Class User
[C#]
public class User

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

A user is described by the user name, password, access rights and PTZ control. When setting a user all these properties are valid, but when getting users the passwords will always be null. This is not a limitation in the component but a security issue in the video device since the HTTP API restricts stating the password.

Example

See user management samples (C#) on how to employ the User Management methods.

Requirements

Namespace: DeviceMgr

Assembly: DeviceMgr (in DeviceMgr.dll)

See Also

User Members | DeviceMgr Namespace | UserManagement | UserList | User Management samples (C#)


User Members

User overview

Public Instance Constructors

User Constructor Initializes a new instance of the User class.

Public Instance Properties

AccessRight | Gets or sets the level of access the user has to a device.
Name | Gets or sets the name of the user.
Password | Gets or sets the password of the user.
PTZControl | Gets or sets whether the user is allowed to control a connected PTZ device.

Public Instance Methods

ToString Converts the value of this instance to a String containing data describing the User.

See Also

User Class | DeviceMgr Namespace | UserManagement | UserList | User Management samples (C#)


User Constructor

Initializes a new instance of the User class.

[Visual Basic]
Overloads Public Sub New( _
ByVal name As String, _
ByVal password As String, _
ByVal accessRight As AccessRight, _
ByVal ptzControl As PtzRight _
)
[C#]
public User(
string name,
string password,
AccessRight accessRight,
PtzRight ptzControl
);

Parameters

name
Name of the user.
password
Password of the user.
accessRight
Level of access the user has to a device.
ptzControl
Whether the user is allowed to control a connected PTZ device.

Example

See user management samples (C#) on how to employ the User Management methods.

See Also

User Class | DeviceMgr Namespace | UserManagement | UserList | User Management samples (C#)


User Properties

The properties of the User class are listed below. For a complete list of User class members, see the User Members topic.

Public Instance Properties

AccessRight | Gets or sets the level of access the user has to a device.
Name | Gets or sets the name of the user.
Password | Gets or sets the password of the user.
PTZControl | Gets or sets whether the user is allowed to control a connected PTZ device.

See Also

User Class | DeviceMgr Namespace | UserManagement | UserList | User Management samples (C#)


AccessRight Property

AXIS Camera Management SDK 2.00

User.AccessRight Property

Gets or sets the level of access the user has to a device.

[Visual Basic]
Public Property AccessRight As AccessRight
[C#]
public AccessRight AccessRight {get; set;}

Property Value

The level of access a user has to a device.

Example

See user management samples (C#) on how to employ the User Management methods.

See Also

User Class | DeviceMgr Namespace | UserManagement | UserList | User Management samples (C#)


Name Property

AXIS Camera Management SDK 2.00

User.Name Property

Gets or sets the name of the user.

[Visual Basic]
Public Property Name As String
[C#]
public string Name {get; set;}

Property Value

The name of a user.

Remarks

Valid first characters are: a-z, A-Z, 0-9 and _

Additional valid characters in a user name: . and -

Example

See user management samples (C#) on how to employ the User Management methods.

See Also

User Class | DeviceMgr Namespace | UserManagement | UserList | User Management samples (C#)


Password Property

AXIS Camera Management SDK 2.00

User.Password Property

Gets or sets the password of the user.

[Visual Basic]
Public Property Password As String
[C#]
public string Password {get; set;}

Property Value

The password of a user.

Remarks

Passwords can consist of one to eight characters. All characters are valid.

Example

See user management samples (C#) on how to employ the User Management methods.

See Also

User Class | DeviceMgr Namespace | UserManagement | UserList | User Management samples (C#)


PTZControl Property

AXIS Camera Management SDK 2.00

User.PTZControl Property

Gets or sets whether the user is allowed to control a connected PTZ device.

[Visual Basic]
Public Property PTZControl As PtzRight
[C#]
public PtzRight PTZControl {get; set;}

Property Value

PtzRight.Ptz if user is allowed to control a connected PTZ device; otherwise PtzRight.NoPtz.

Remarks

Note PTZ control is device-dependent. A device with no PTZ support will ignoring this property.

Example

See user management samples (C#) on how to employ the User Management methods.

See Also

User Class | DeviceMgr Namespace | UserManagement | UserList | User Management samples (C#)


User Methods

The methods of the User class are listed below. For a complete list of User class members, see the User Members topic.

Public Instance Methods

ToString Converts the value of this instance to a String containing data describing the User.

See Also

User Class | DeviceMgr Namespace | UserManagement | UserList | User Management samples (C#)


User.ToString Method

Converts the value of this instance to a String containing data describing the User.

[Visual Basic]
Overrides Public Function ToString() As String
[C#]
public override string ToString();

Return Value

A String whose value represents the User.

Example

See user management samples (C#) on how to employ the User Management methods.

See Also

User Class | DeviceMgr Namespace | UserManagement | UserList | User Management samples (C#)


UserList Class

A list of User(s).

For a list of all members of this type, see UserList Members.

System.Object
DeviceMgr.UserList

[Visual Basic]
Public Class UserList
Implements IEnumerable
[C#]
public class UserList : IEnumerable

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Example

See user management samples (C#) on how to employ the User Management methods.

Requirements

Namespace: DeviceMgr

Assembly: DeviceMgr (in DeviceMgr.dll)

See Also

UserList Members | DeviceMgr Namespace | UserManagement | User | User Management samples (C#)


UserList Members

UserList overview

Public Instance Properties

Count | Gets the count of User(s) in the list.
Item | Gets the User at the specified indexed location in the list.

Public Instance Methods

GetEnumerator | Returns an enumerator that iterates through the User(s).
ToString | Converts the value of this instance to a String containing the User data in the UserList.

See Also

UserList Class | DeviceMgr Namespace | UserManagement | User | User Management samples (C#)


UserList Properties

The properties of the UserList class are listed below. For a complete list of UserList class members, see the UserList Members topic.

Public Instance Properties

Count | Gets the count of User(s) in the list.
Item | Gets the User at the specified indexed location in the list.

See Also

UserList Class | DeviceMgr Namespace | UserManagement | User | User Management samples (C#)


Count Property

AXIS Camera Management SDK 2.00

UserList.Count Property

Gets the count of User(s) in the list.

[Visual Basic]
Public ReadOnly Property Count As Integer
[C#]
public int Count {get;}

Property Value

The number of User(s) actually contained in the UserList.

Example

See user management samples (C#) on how to employ the User Management methods.

See Also

UserList Class | DeviceMgr Namespace | UserManagement | User | User Management samples (C#)


Item Property

AXIS Camera Management SDK 2.00

UserList.Item Property

Gets the User at the specified indexed location in the list.

[Visual Basic]
Public Default ReadOnly Property Item( _
ByVal index As Integer _
) As User
[C#]
public User this[
int index
] {get;}

Parameters

index
The indexed location of the User in the list.

Property Value

The User at the specified indexed location in the list.

Example

See user management samples (C#) on how to employ the User Management methods.

See Also

UserList Class | DeviceMgr Namespace | UserManagement | User | User Management samples (C#)


UserList Methods

The methods of the UserList class are listed below. For a complete list of UserList class members, see the UserList Members topic.

Public Instance Methods

GetEnumerator | Returns an enumerator that iterates through the User(s).
ToString | Converts the value of this instance to a String containing the User data in the UserList.

See Also

UserList Class | DeviceMgr Namespace | UserManagement | User | User Management samples (C#)


UserList.GetEnumerator Method

Returns an enumerator that iterates through the User(s).

[Visual Basic]
NotOverridable Public Function GetEnumerator() As IEnumerator _
Implements IEnumerable.GetEnumerator
[C#]
public IEnumerator GetEnumerator();

Return Value

An IEnumerator for the UserList instance.

Implements

IEnumerable.GetEnumerator

Example

See user management samples (C#) on how to employ the User Management methods.

See Also

UserList Class | DeviceMgr Namespace | UserManagement | User | User Management samples (C#)


UserList.ToString Method

Converts the value of this instance to a String containing the User data in the UserList.

[Visual Basic]
Overrides Public Function ToString() As String
[C#]
public override string ToString();

Return Value

A String whose value represents the User(s) in the UserList.

Example

See user management samples (C#) on how to employ the User Management methods.

See Also

UserList Class | DeviceMgr Namespace | UserManagement | User | User Management samples (C#)


UserManagement Class

Employed when getting, setting and removing users.

For a list of all members of this type, see UserManagement Members.

System.Object
DeviceMgr.UserManagement

[Visual Basic]
Public Class UserManagement
[C#]
public class UserManagement

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

UserManagement makes it easy to manage users in Axis devices. Using the component to change password on all devices periodically increases the security.

Example

See user management samples (C#) on how to employ the User Management methods.

Requirements

Namespace: DeviceMgr

Assembly: DeviceMgr (in DeviceMgr.dll)

See Also

UserManagement Members | DeviceMgr Namespace | User Management samples (C#) | The Asynchronous Pattern


UserManagement Members

UserManagement overview

Public Static (Shared) Methods

AddGetUsers | Adds the function to get users to an existing Operation.
AddRemoveUser | Adds the function to remove a User to an existing Operation.
AddSetUser | Adds the function to set a User to an existing Operation.
GetUserList | Extracts the UserList from a Result returned by EndGetUsers.

Public Instance Constructors

UserManagement Constructor Initializes a new instance of the UserManagement class.

Public Instance Methods

BeginGetUsers | Begins an asynchronous request for getting User(s) from a device.
BeginRemoveUser | Begins an asynchronous request for removing a User from a device.
BeginSetUser | Begins an asynchronous request for setting a User in a device.
Cancel | Cancels an operation. Does not wait for the cancel to complete. Use End methods for waiting.
EndGetUsers | Waits for BeginGetUsers to end and returns the existing users.
EndRemoveUser | Waits for BeginRemoveUser to end and returns the Result.
EndSetUser | Waits for BeginSetUser to end and returns the Result.

Public Instance Events

ProgressUpdate Progress event during a BeginGetUsers, BeginRemoveUser and BeginSetUser requests.

See Also

UserManagement Class | DeviceMgr Namespace | User Management samples (C#) | The Asynchronous Pattern


UserManagement Constructor

Initializes a new instance of the UserManagement class.

[Visual Basic]
Public Sub New()
[C#]
public UserManagement();

Example

See user management samples (C#) on how to employ the User Management methods.

See Also

UserManagement Class | DeviceMgr Namespace | User Management samples (C#)


UserManagement Methods

The methods of the UserManagement class are listed below. For a complete list of UserManagement class members, see the UserManagement Members topic.

Public Static (Shared) Methods

AddGetUsers | Adds the function to get users to an existing Operation.
AddRemoveUser | Adds the function to remove a User to an existing Operation.
AddSetUser | Adds the function to set a User to an existing Operation.
GetUserList | Extracts the UserList from a Result returned by EndGetUsers.

Public Instance Methods

BeginGetUsers | Begins an asynchronous request for getting User(s) from a device.
BeginRemoveUser | Begins an asynchronous request for removing a User from a device.
BeginSetUser | Begins an asynchronous request for setting a User in a device.
Cancel | Cancels an operation. Does not wait for the cancel to complete. Use End methods for waiting.
EndGetUsers | Waits for BeginGetUsers to end and returns the existing users.
EndRemoveUser | Waits for BeginRemoveUser to end and returns the Result.
EndSetUser | Waits for BeginSetUser to end and returns the Result.

See Also

UserManagement Class | DeviceMgr Namespace | User Management samples (C#) | The Asynchronous Pattern


UserManagement.AddGetUsers Method

Adds the function to get users to an existing Operation.

[Visual Basic]
Public Shared Sub AddGetUsers( _
ByVal operation As Operation, _
ByVal connectionInfo As ConnectionInfo, _
ByVal state As Object _
)
[C#]
public static void AddGetUsers(
Operation operation,
ConnectionInfo connectionInfo,
object state
);

Parameters

operation
The operation this function is added to.
connectionInfo
The connection info used when accessing the device.
state
A user provided object that is passed to the method invoked when the asynchronous operation completes or in the result and can e.g. contain user state information.

Example

See user management samples (C#) on how to employ the User Management methods.

See Also

UserManagement Class | DeviceMgr Namespace | User Management samples (C#)


UserManagement.AddRemoveUser Method

Adds the function to remove a User to an existing Operation.

[Visual Basic]
Public Shared Sub AddRemoveUser( _
ByVal operation As Operation, _
ByVal connectionInfo As ConnectionInfo, _
ByVal userName As String, _
ByVal state As Object _
)
[C#]
public static void AddRemoveUser(
Operation operation,
ConnectionInfo connectionInfo,
string userName,
object state
);

Parameters

operation
The operation this function is added to.
connectionInfo
The connection info used when accessing the device.
userName
The name of the user.
state
A user provided object that is passed to the method invoked when the asynchronous operation completes or in the result and can e.g. contain user state information.

Remarks

Note It is prohibited to remove the user root from a device. It is though possible to increase security by creating a new administrator and then lowering the access rights of root to e.g. viewer. But be aware that removing the last administrator on a device will lock it and any further modification of the device is prohibited. The only way to access the device as an administrator again is by performing a physical factory default.

Example

See user management samples (C#) on how to employ the User Management methods.

See Also

UserManagement Class | DeviceMgr Namespace | User Management samples (C#)


UserManagement.AddSetUser Method

Adds the function to set a User to an existing Operation.

[Visual Basic]
Public Shared Sub AddSetUser( _
ByVal operation As Operation, _
ByVal connectionInfo As ConnectionInfo, _
ByVal user As User, _
ByVal state As Object _
)
[C#]
public static void AddSetUser(
Operation operation,
ConnectionInfo connectionInfo,
User user,
object state
);

Parameters

operation
The operation this function is added to.
connectionInfo
The connection info used when accessing the device.
user
The user to add or modify.
state
A user provided object that is passed to the method invoked when the asynchronous operation completes or in the result and can e.g. contain user state information.

Remarks

The user will either be added or modified, depending on if it exists on a device or not.

Note It is possible to lock a device by lowering all users to access level viewer. It is still possible to view the video-feed but all modifications of the device is prohibited. The only way to access the device as an administrator again is by performing a physical factory default.

Some devices, e.g. AXIS 206, does only present two levels of access rights when adding users via a devices web site, Administrator and Viewer. Even though it is not exposed, the access level Operator is still supported.

Example

See user management samples (C#) on how to employ the User Management methods.

See Also

UserManagement Class | DeviceMgr Namespace | User Management samples (C#)


UserManagement.BeginGetUsers Method

Begins an asynchronous request for getting User(s) from a device.

[Visual Basic]
Public Function BeginGetUsers( _
ByVal connectionInfo As ConnectionInfo, _
ByVal callback As AsyncCallback, _
ByVal state As Object _
) As IAsyncResult
[C#]
public IAsyncResult BeginGetUsers(
ConnectionInfo connectionInfo,
AsyncCallback callback,
object state
);

Parameters

connectionInfo
The connection info used when accessing the device.
callback
The AsyncCallback delegate.
state
A user provided object that is passed to the method invoked when the asynchronous operation completes or in the result and can e.g. contain user state information.

Return Value

An IAsyncResult that references the asynchronous request.

Remarks

The BeginGetUsers method starts an asynchronous request for getting Users from a device. The callback method that implements the AsyncCallback delegate uses the EndGetUsers method to return the users.

Example

See user management sample (C#) on how to get users using the User Management methods.

See Also

UserManagement Class | DeviceMgr Namespace | User Management samples (C#) | The Asynchronous Pattern


UserManagement.BeginRemoveUser Method

Begins an asynchronous request for removing a User from a device.

[Visual Basic]
Public Function BeginRemoveUser( _
ByVal connectionInfo As ConnectionInfo, _
ByVal userName As String, _
ByVal callback As AsyncCallback, _
ByVal state As Object _
) As IAsyncResult
[C#]
public IAsyncResult BeginRemoveUser(
ConnectionInfo connectionInfo,
string userName,
AsyncCallback callback,
object state
);

Parameters

connectionInfo
The connection info used when accessing the device.
userName
The name of the user.
callback
The AsyncCallback delegate.
state
A user provided object that is passed to the method invoked when the asynchronous operation completes or in the result and can e.g. contain user state information.

Return Value

An IAsyncResult that references the asynchronous request.

Remarks

The BeginRemoveUser method starts an asynchronous request for removing a User from a device. The callback method that implements the AsyncCallback delegate uses the EndRemoveUser method to return Result.

Note It is prohibited to remove the user root from a device. It is though possible to increase security by creating a new administrator and then lowering the access rights of root to e.g. viewer. But be aware that removing the last administrator on a device will lock it and any further modification of the device is prohibited. The only way to access the device as an administrator again is by performing a physical factory default.

Example

See user management sample (C#) on how to remove a user using the User Management methods.

See Also

UserManagement Class | DeviceMgr Namespace | User Management samples (C#) | The Asynchronous Pattern


UserManagement.BeginSetUser Method

Begins an asynchronous request for setting a User in a device.

[Visual Basic]
Public Function BeginSetUser( _
ByVal connectionInfo As ConnectionInfo, _
ByVal user As User, _
ByVal callback As AsyncCallback, _
ByVal state As Object _
) As IAsyncResult
[C#]
public IAsyncResult BeginSetUser(
ConnectionInfo connectionInfo,
User user,
AsyncCallback callback,
object state
);

Parameters

connectionInfo
The connection info used when accessing the device.
user
The user to add or modify.
callback
The AsyncCallback delegate.
state
A user provided object that is passed to the method invoked when the asynchronous operation completes or in the result and can e.g. contain user state information.

Return Value

An IAsyncResult that references the asynchronous request.

Remarks

The BeginSetUser method starts an asynchronous request for setting a User in a device. The callback method that implements the AsyncCallback delegate uses the EndSetUser method to return Result.

Note It is possible to lock a device by lowering all users to access level viewer. It is still possible to view the video-feed but all modifications of the device is prohibited. The only way to access the device as an administrator again is by performing a physical factory default.

Some devices, e.g. AXIS 206, does only present two levels of access rights when adding users via a devices web site, Administrator and Viewer. Even though it is not exposed, the access level Operator is still supported.

Example

See user management sample (C#) on how to set a user using the User Management methods.

See Also

UserManagement Class | DeviceMgr Namespace | User Management samples (C#) | The Asynchronous Pattern


UserManagement.Cancel Method

Cancels an operation. Does not wait for the cancel to complete. Use End methods for waiting.

[Visual Basic]
Public Sub Cancel( _
ByVal ar As IAsyncResult _
)
[C#]
public void Cancel(
IAsyncResult ar
);

Parameters

ar
The IAsyncResult handle returned by the corresponding Begin method.

Remarks

A Cancel call will not block and wait for the request to be canceled. Use asyncResult.AsyncWaitHandle.WaitOne(); or corresponding End method to wait for the request to be canceled or completed.

The returned values in the case of a subsequent corresponding End method depends on the timing of the Cancel call.

Note Canceling an ongoing request may produce an undefined result. For example, depending on the timing of the Cancel call, the request may have finished before the call could cancel it. Or in the case of an upgrade request, the firmware file may have been sent to the device, which will continue the upgrade even if the connection is disconnected by a cancel.

Example

See user management samples (C#) on how to employ the User Management methods.

See Also

UserManagement Class | DeviceMgr Namespace | User Management samples (C#) | The Asynchronous Pattern


UserManagement.EndGetUsers Method

Waits for BeginGetUsers to end and returns the existing users.

[Visual Basic]
Public Function EndGetUsers( _
ByVal ar As IAsyncResult, _
ByRef userList As UserList _
) As Result
[C#]
public Result EndGetUsers(
IAsyncResult ar,
out UserList userList
);

Parameters

ar
The IAsyncResult handle returned by the corresponding Begin method.
userList
The existing users on the device if UserManagement was successful: otherwise null.

Return Value

The Result describing the function status.

Example

See user management sample (C#) on how to get users using the User Management methods.

See Also

UserManagement Class | DeviceMgr Namespace | User Management samples (C#) | The Asynchronous Pattern


UserManagement.EndRemoveUser Method

Waits for BeginRemoveUser to end and returns the Result.

[Visual Basic]
Public Function EndRemoveUser( _
ByVal ar As IAsyncResult _
) As Result
[C#]
public Result EndRemoveUser(
IAsyncResult ar
);

Parameters

ar
The IAsyncResult handle returned by the corresponding Begin method.

Return Value

The Result describing the function status.

Example

See user management sample (C#) on how to remove a user using the User Management methods.

See Also

UserManagement Class | DeviceMgr Namespace | User Management samples (C#) | The Asynchronous Pattern


UserManagement.EndSetUser Method

Waits for BeginSetUser to end and returns the Result.

[Visual Basic]
Public Function EndSetUser( _
ByVal ar As IAsyncResult _
) As Result
[C#]
public Result EndSetUser(
IAsyncResult ar
);

Parameters

ar
The IAsyncResult handle returned by the corresponding Begin method.

Return Value

The Result describing the function status.

Example

See user management sample (C#) on how to set a user using the User Management methods.

See Also

UserManagement Class | DeviceMgr Namespace | User Management samples (C#) | The Asynchronous Pattern


UserManagement.GetUserList Method

Extracts the UserList from a Result returned by EndGetUsers.

[Visual Basic]
Public Shared Function GetUserList( _
ByVal result As Result _
) As UserList
[C#]
public static UserList GetUserList(
Result result
);

Parameters

result
A Result returned by EndGetUsers.

Return Value

The existing users on the device if UserManagement was successful; otherwise null.

Example

See user management samples (C#) on how to employ the User Management methods.

See Also

UserManagement Class | DeviceMgr Namespace | User Management samples (C#)


UserManagement Events

The events of the UserManagement class are listed below. For a complete list of UserManagement class members, see the UserManagement Members topic.

Public Instance Events

ProgressUpdate Progress event during a BeginGetUsers, BeginRemoveUser and BeginSetUser requests.

See Also

UserManagement Class | DeviceMgr Namespace | User Management samples (C#) | The Asynchronous Pattern


UserManagement.ProgressUpdate Event

Progress event during a BeginGetUsers, BeginRemoveUser and BeginSetUser requests.

[Visual Basic]
Public Event ProgressUpdate As ProgressEventHandler
[C#]
public event ProgressEventHandler ProgressUpdate;

Event Data

The event handler receives an argument of type ProgressEventArgs containing data related to this event. The following ProgressEventArgs properties provide information specific to this event.

Property | Description
AsyncState | Gets an object containing information about the ProgressEventArgs.
Progress | Gets the progress percent.

Example

See user management samples (C#) on how to employ the User Management methods.

See Also

UserManagement Class | DeviceMgr Namespace | User Management samples (C#)


DeviceMgrHierarchy

AXIS Camera Management SDK 2.00

DeviceMgr Hierarchy

System.Object
DeviceMgr.AssignIP
DeviceMgr.AvailableSoftware
DeviceMgr.Config
DeviceMgr.ConnectionInfo
DeviceMgr.Discover
DeviceMgr.DiscoveredDevice
DeviceMgr.Imaging
DeviceMgr.Maintenance
DeviceMgr.Operation
DeviceMgr.OperationMgr
DeviceMgr.Parameter
DeviceMgr.ParameterList ---- System.Collections.IEnumerable
DeviceMgr.Pinger
DeviceMgr.Product
DeviceMgr.ProductList ---- System.Collections.IEnumerable
DeviceMgr.Result
DeviceMgr.ResultList ---- System.Collections.IEnumerable
DeviceMgr.ResultName
DeviceMgr.Settings
DeviceMgr.Software
DeviceMgr.SoftwareList ---- System.Collections.IEnumerable
DeviceMgr.SoftwareVersion ---- System.IComparable
DeviceMgr.Status
DeviceMgr.Template
DeviceMgr.TemplateConst
DeviceMgr.Update
DeviceMgr.Upgrade
DeviceMgr.User
DeviceMgr.UserList ---- System.Collections.IEnumerable
DeviceMgr.UserManagement
System.Collections.DictionaryBase ---- System.Collections.ICollection, System.Collections.IDictionary, System.Collections.IEnumerable
DeviceMgr.DiscoveredDeviceList
System.Delegate ---- System.ICloneable, System.Runtime.Serialization.ISerializable
System.MulticastDelegate
DeviceMgr.DiscoveryEventHandler
DeviceMgr.ProgressEventHandler
DeviceMgr.StatusEventHandler
System.EventArgs
DeviceMgr.DiscoverEventArgs
DeviceMgr.ProgressEventArgs
DeviceMgr.StatusEventArgs
System.ValueType
System.Enum ---- System.IComparable, System.IConvertible, System.IFormattable
DeviceMgr.AccessRight
DeviceMgr.Protocol
DeviceMgr.PtzRight
DeviceMgr.ResultStatus

See Also

DeviceMgr Namespace


Win32AsyncDiscover.cpp

// This sample demonstrates how to discover devices using the asyncrounous
// programming pattern.
// Can be compared to the Win32Discover sample, which uses the syncrounous
// programming pattern.

#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
#include <stdio.h>
#include <tchar.h>
#include <windows.h>
#include <vector>

#include "Discover.h"

// Prototype for callbacks
void __stdcall DiscoveredDeviceCallback(AsyncResult ar,
                                        DiscoveredDevice* device,
                                        void* stateObject);
void __stdcall DiscoverProgressCallback(int progress, void* stateObject);
void __stdcall DiscoverCompletedCallback(AsyncResult ar, void* stateObject);

// Handle for signaling completion
HANDLE waitHandle;

int _tmain(int argc, _TCHAR* argv[])
{
  // The wait handle used for signaling when the operation is complete
  waitHandle = ::CreateEvent(NULL, TRUE, FALSE, NULL);

  // A user defined state object that will be provided as a parameter in
  // each callback
  char* stateObject = "state";

  printf("Discover ...\n");
  AsyncResult ar = Discover::BeginSearchLocal(DiscoverCompletedCallback,
    DiscoveredDeviceCallback,
    DiscoverProgressCallback, stateObject);

  // Do some work while waiting for the operation to complete (signaled
  // in CompletedCallback)
  printf("Doing something else in main thread ...\n");
  ::WaitForSingleObject(waitHandle, INFINITE);

  // Get list of all discovered devices and clean up
  std::vector<DiscoveredDevice>* deviceList = Discover::EndSearchLocal(ar);

  if (deviceList != NULL)
  {
    printf("\n\nDiscovered %d devices:\nSerial Number  IP Address   \tName\n",
      deviceList->size());
    for (std::vector<DiscoveredDevice>::size_type i = 0;
      i < deviceList->size(); i++)
    {
      printf("%s   %s  \t%s\n", deviceList->at(i).SerialNumber.c_str(),
        deviceList->at(i).IPAddress.c_str(), deviceList->at(i).Name.c_str());
    }

    delete deviceList;
  }

  return 0;
}

// Called for each discovered device
void __stdcall DiscoveredDeviceCallback(AsyncResult ar,
                                        DiscoveredDevice* device,
                                        void* stateObject)
{
  printf("%s - %s, %s, %s\n", stateObject, device->IPAddress.c_str(),
    device->Name.c_str(), device->SerialNumber.c_str());
  delete device;
}

// Called for each progress event
void __stdcall DiscoverProgressCallback(int progress, void* stateObject)
{
  printf("%s - Progress %ld%%\n", stateObject, progress);
}

// Called when operation is complete
void __stdcall DiscoverCompletedCallback(AsyncResult ar, void* stateObject)
{
  printf("%s - Completed Callback!\n", stateObject);

  // Signal to the main thread that Discover is completed
  ::SetEvent(waitHandle);
}


Win32Discover.cpp

// This sample demonstrate how to use discover devices using a synchronous
// programming pattern.
// Can be compared to the Win32AsyncDiscover sample, which uses the
// asynchronous programming pattern.

#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
#include <stdio.h>
#include <tchar.h>
#include <vector>

#include "Discover.h"

// Prototype for progress callback
void __stdcall DiscoverProgressCallback(int progress, void* stateObject);

int _tmain(int argc, _TCHAR* argv[])
{
  printf("Discover progress: ");
  std::vector<DiscoveredDevice>* deviceList = Discover::SearchLocal(
    DiscoverProgressCallback);

  if (deviceList != NULL)
  {
    printf("\n\nDiscovered %d devices:\nSerial Number  IP Address   \tName\n",
      deviceList->size());
    for (std::vector<DiscoveredDevice>::size_type i = 0;
      i < deviceList->size(); i++)
    {
      printf("%s   %s  \t%s\n", deviceList->at(i).SerialNumber.c_str(),
        deviceList->at(i).IPAddress.c_str(), deviceList->at(i).Name.c_str());
    }

    delete deviceList;
  }

  return 0;
}

// Called for each progress event
void __stdcall DiscoverProgressCallback(int progress, void* stateObject)
{
  printf("%ld%%, ", progress);
}


Win32TemplateOperation.cpp

// This sample demonstrates how to send a template with parameter settings to
// two devices. It also demonstrates how to use the OperationManager to
// combine the two operations into one combined parallel operation

#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
#include <stdio.h>
#include <tchar.h>
#include <vector>

#include "OperationMgr.h"
#include "Template.h"

// Prototypes for functions
void __stdcall TemplateProgressCallback(int progress, void* stateObject);
void DisplayResultList(std::vector<Result>* resultList);
void DisplayResult(Result* theResult);

// Templates to apply, the format is in ini file format similar to the server
// report. This is the same format that is used in AXIS Camera Management
// templates.
char* templateLedOff =
  "[StatusLED]\r\n"
  "FlashInterval = \"4\"\r\n"
  "Usage = \"off\"";
char* templateLedOn =
  "[StatusLED]\r\n"
  "FlashInterval = \"4\"\r\n"
  "Usage = \"on\"";

int _tmain(int argc, _TCHAR* argv[])
{
  // Devices to send template to
  ConnectionInfo connectionInfo1;
  connectionInfo1.Address = "10.84.135.1";
  connectionInfo1.UserName = "root";
  connectionInfo1.Password = "pass";

  ConnectionInfo connectionInfo2;
  connectionInfo2.Address = "10.84.135.2";
  connectionInfo2.UserName = "root";
  connectionInfo2.Password = "pass";

  // Create an operation
  Operation operation = OperationMgr::CreateParallelOperation();

  // Add things to do in parallel
  Template::AddApplyTemplate(operation, &connectionInfo1, templateLedOff);
  Template::AddApplyTemplate(operation, &connectionInfo2, templateLedOff);

  // Start the operation and wait for it's completion
  printf("Apply Templates \nProgress: ");
  AsyncResult ar = OperationMgr::BeginOperation(operation, NULL,
    TemplateProgressCallback, NULL);

  std::vector<Result>* resultList = OperationMgr::EndOperation(ar);
  DisplayResultList(resultList);
  delete resultList;

  return 0;
}

// Called for each progress event
void __stdcall TemplateProgressCallback(int progress, void* stateObject)
{
  printf("%ld%%, ", progress);
}

// Display the list of results, there is one result for each operation added.
// Template operations will have one result for each operation within the
// template like a Restart function or a set date function. A sequence of set
// parameters will have one combined result and this result has one sub result
// for each parameter.
void DisplayResultList(std::vector<Result>* resultList)
{
  printf("\n%ld results, \n", resultList->size());
  for (std::vector<Result>::size_type i = 0; i < resultList->size(); i++)
  {
    DisplayResult(&resultList->at(i));
  }
  printf("\n");
}

// Displays one result, if the result has a subresult list, that list is also
// displayed
void DisplayResult(Result* result)
{
  printf(" Name: %s\n Status: %ld\n Error Message: %s\n", result->Name.c_str(),
    result->Status, result->ErrorMessage.c_str());

  if (result->Connection != NULL)
  {
    printf(" Connection - Address: %s\n Connection - UserName: %s\n"
      " Connection - Password: %s\n Connection - Port: %ld\n"
      " Connection - Protocol: %ld\n",
      result->Connection->Address.c_str(), result->Connection->UserName.c_str(),
      result->Connection->Password.c_str(), result->Connection->Port,
      result->Connection->Protocol);
  }

  if (result->ParameterList != NULL)
  {
    for (std::vector<Parameter>::size_type i = 0; i < result->ParameterList->size(); i++)
    {
      printf(" Parameter: %s = %s\n", result->ParameterList->at(i).Name.c_str(),
        result->ParameterList->at(i).Value.c_str());
    }
  }

  if (result->SubResultList != NULL)
  {
    printf("SubResult:");
    DisplayResultList(result->SubResultList);
  }
}


Win32Upgrade.cpp

// This sample demonstartes how to perfom an upgrade operation

#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
#include <stdio.h>
#include <tchar.h>
#include <windows.h>

#include "Upgrade.h"

// Prototype for callback functions
void __stdcall UpgradeProgressCallback(int progress, void* stateObject);
void __stdcall UpgradeCompletedCallback(AsyncResult ar, void* stateObject);

HANDLE waitHandle;

int _tmain(int argc, _TCHAR* argv[])
{
  // The wait handle used for signaling when the operation is complete
  waitHandle = ::CreateEvent(NULL, TRUE, FALSE, NULL);

  // Device to send firmware to
  ConnectionInfo connectionInfo;
  connectionInfo.Address = "10.84.135.1";
  connectionInfo.UserName = "root";
  connectionInfo.Password = "pass";

  printf("Upgrading device \nProgress: ");
  AsyncResult ar = Upgrade::BeginUpgrade(&connectionInfo,
    "C:\\Firmware\\AXIS 206_4.21.bin",
    UpgradeProgressCallback, UpgradeCompletedCallback, NULL);

  // Do some work while waiting for the operation to complete
  // (signaled in CompletedCallback)
  ::WaitForSingleObject(waitHandle, INFINITE);

  // Get the result of the upgrade
  Result* result = Upgrade::EndUpgrade(ar);
  if (result)
  {
    printf("Result Status: %ld\n", result->Status);
    delete result;
  }

  return 0;
}

// Called for each progress event
void __stdcall UpgradeProgressCallback(int progress, void* stateObject)
{
  printf("%d%%, ", progress);
}

// Called when operation is complete
void __stdcall UpgradeCompletedCallback(AsyncResult ar, void* stateObject)
{
  printf("\nCompleted Callback!\n");
  ::SetEvent(waitHandle);
}


using System;
using DeviceMgr;

// Sample of enabling DHCP on a device.
class EnableDHCP
{
  static void Main(string[] args)
  {
    // Enter IP address or hostname, user name and password
    ConnectionInfo connectionInfo = new ConnectionInfo("10.84.154.100",
      "root", "pass");

    AssignIP assignIP = new AssignIP();

    // Add progress event handler
    assignIP.ProgressUpdate += ProgressCallback;

    // Start assigning IP
    IAsyncResult ar = assignIP.BeginEnableDHCP(connectionInfo,
      CompletedCallback, null);

    // Read the result
    Result result = assignIP.EndEnableDHCP(ar);
    Console.WriteLine("Result: {0}\n", result.Status);
  }

  private static void ProgressCallback(object sender, ProgressEventArgs e)
  {
    Console.Write("{0}%, ", e.Progress);
  }

  private static void CompletedCallback(IAsyncResult ar)
  {
    Console.WriteLine("Completed Callback!");
  }
}


using System;
using DeviceMgr;

// Sample of assigning a new IP address to a device.
class SetIP
{
  static void Main(string[] args)
  {
    // Enter IP address or hostname, user name and password
    ConnectionInfo connectionInfo = new ConnectionInfo("10.84.154.100",
      "root", "pass");

    AssignIP assignIP = new AssignIP();

    // Add progress event handler
    assignIP.ProgressUpdate += ProgressCallback;

    // Start assigning IP
    IAsyncResult ar = assignIP.BeginSetIP(connectionInfo, "10.84.154.101",
      "255.255.0.0", "10.84.0.1", CompletedCallback, null);

    // Read the result
    Result result = assignIP.EndSetIP(ar);
    Console.WriteLine("Result: {0}\n", result.Status);
  }

  private static void ProgressCallback(object sender, ProgressEventArgs e)
  {
    Console.Write("{0}%, ", e.Progress);
  }

  private static void CompletedCallback(IAsyncResult ar)
  {
    Console.WriteLine("Completed Callback!");
  }
}


using System;
using DeviceMgr;

// Sample of getting the parameter definitions from a Axis devices.
// NOTE: This funtionality is only supported by firmware versions 4.40 and
// higher.
class GetParameterInfo
{
  static void Main(string[] args)
  {
    // Enter IP address or hostname, user name and password
    ConnectionInfo connectionInfo = new ConnectionInfo("10.84.154.100",
      "root", "pass");

    Config config = new Config();

    // Add progress handler
    config.ProgressUpdate += ProgressCallback;

    // Start getting the parameter definitions from device
    IAsyncResult ar = config.BeginGetParameterInfo(connectionInfo,
      CompletedCallback, null);

    // Read the definitions
    Result result;
    string parameterDefinitions = config.EndGetParameterInfo(ar, out result);

    Console.WriteLine("\nResult: {0}\n", result.Status);
    Console.WriteLine("Parameter definitions:\n\n{0}", parameterDefinitions);
  }

  private static void ProgressCallback(object sender, ProgressEventArgs e)
  {
    Console.Write("{0}%, ", e.Progress);
  }

  private static void CompletedCallback(IAsyncResult ar)
  {
    Console.WriteLine("Completed Callback!");
  }
}


using System;
using DeviceMgr;

// Sample of getting parameters from a Axis devices.
class GetParameters
{
  static void Main(string[] args)
  {
    // Enter IP address or hostname, user name and password
    ConnectionInfo connectionInfo = new ConnectionInfo("10.84.154.100",
      "root", "pass");

    // Create a parameter list containing parameter names
    ParameterList parameterList = new ParameterList();
    parameterList.Add(new Parameter("Image.I0.Text.TextEnabled", null));
    parameterList.Add(new Parameter("Image.I0.Text.String", null));

    Config config = new Config();

    // Add progress handler
    config.ProgressUpdate += ProgressCallback;

    // Start getting parameters from device
    IAsyncResult ar = config.BeginGet(connectionInfo, parameterList,
      CompletedCallback, null);

    // Read the parameters
    Result result = config.EndGet(ar, out parameterList);

    PrintResult(result, parameterList);
  }

  private static void ProgressCallback(object sender, ProgressEventArgs e)
  {
    Console.Write("{0}%, ", e.Progress);
  }

  private static void CompletedCallback(IAsyncResult ar)
  {
    Console.WriteLine("Completed Callback!");
  }

  private static void PrintResult(Result result, ParameterList parameterList)
  {
    Console.WriteLine("\nResult: {0}\n", result.Status);

    // Make sure there are any parameters to print
    if (parameterList == null)
    {
      return;
    }

    foreach (Parameter parameter in parameterList)
    {
      Console.WriteLine("{0} = \"{1}\"", parameter.Name, parameter.Value);
    }
  }
}


using System;
using DeviceMgr;

// Sample of setting the date and time on a Axis devices.
class SetDateTime
{
  static void Main(string[] args)
  {
    // Enter IP address or hostname, user name and password
    ConnectionInfo connectionInfo = new ConnectionInfo("10.84.154.100",
      "root", "pass");

    Config config = new Config();

    // Add progress handler
    config.ProgressUpdate += ProgressCallback;

    // Start setting the date and time on device (also possible to specify
    // "TODAY" and "NOW")
    IAsyncResult ar = config.BeginSetDateTime(connectionInfo,
      "2006-06-15", "12:00:00",  CompletedCallback, null);

    // Read the result
    Result result = config.EndSetDateTime(ar);

    Console.WriteLine("\nResult: {0}\n", result.Status);
  }

  private static void ProgressCallback(object sender, ProgressEventArgs e)
  {
    Console.Write("{0}%, ", e.Progress);
  }

  private static void CompletedCallback(IAsyncResult ar)
  {
    Console.WriteLine("Completed Callback!");
  }
}


using System;
using DeviceMgr;

// Sample of setting parameters in a Axis devices.
class SetParameters
{
  static void Main(string[] args)
  {
    // Enter IP address or hostname, user name and password
    ConnectionInfo connectionInfo = new ConnectionInfo("10.84.154.100",
      "root", "pass");

    // Create a parameter list containing parameter names
    ParameterList parameterList = new ParameterList();
    parameterList.Add(new Parameter("Image.I0.Text.TextEnabled", "yes"));
    parameterList.Add(new Parameter("Image.I0.Text.String",
      "Testing ACM SDK sample"));

    Config config = new Config();

    // Add progress handler
    config.ProgressUpdate += ProgressCallback;

    // Start setting parameters in device
    IAsyncResult ar = config.BeginSet(connectionInfo, parameterList,
      CompletedCallback, null);

    // Read the parameters
    Result result = config.EndSet(ar);

    Console.WriteLine("\nResult: {0}\n", result.Status);
  }

  private static void ProgressCallback(object sender, ProgressEventArgs e)
  {
    Console.Write("{0}%, ", e.Progress);
  }

  private static void CompletedCallback(IAsyncResult ar)
  {
    Console.WriteLine("Completed Callback!");
  }
}


using System;
using DeviceMgr;

// Sample of searching a specified IP address for a Axis device.
class SearchAddress
{
  static void Main(string[] args)
  {
    // Enter IP address or hostname, user name and password
    ConnectionInfo connectionInfo = new ConnectionInfo("10.84.154.100",
      "root", "pass");

    Discover discover = new Discover();

    // Add progress handler
    discover.ProgressUpdate += ProgressCallback;

    // Start searching for the device
    IAsyncResult ar = discover.BeginSearchAddress(connectionInfo, null, null);

    Result result;
    DiscoveredDevice discoveredDevice = discover.EndSearchAddress(ar, out result);

    Console.WriteLine("\nResult: {0}", result.Status);
    Console.WriteLine("Discovered device: {0}\n", discoveredDevice);
  }

  private static void ProgressCallback(object sender, ProgressEventArgs e)
  {
    Console.Write("{0}..", e.Progress);
  }
}


using System;
using DeviceMgr;

// Sample of searching the local network for Axis devices.
// NOTE: The DeviceMgr.dll reference and Bonjour.dll must exist in the same
// folder when running sample. Copying Bonjour.dll to output folder using
// post-build event can solve this.
class SearchLocal
{
  static void Main(string[] args)
  {
    Discover discover = new Discover();

    // Add discovered device handler
    discover.DiscoverUpdate += DiscoveredDeviceCallback;

    // Add progress handler
    discover.ProgressUpdate += ProgressCallback;

    Console.WriteLine("Discovered devices:");

    // Start searching for devices
    IAsyncResult ar = discover.BeginSearchLocal(CompletedCallback, null);

    discover.EndSearchLocal(ar);
  }

  private static void DiscoveredDeviceCallback(object sender,
    DiscoverEventArgs e)
  {
    DiscoveredDevice device = e.DiscoveredDevice;
    Console.WriteLine("{0}   {1}   \t{2}", device.SerialNumber, device.IPAddress, device.Name);
  }

  private static void ProgressCallback(object sender, ProgressEventArgs e)
  {
    Console.WriteLine("Progress: {0}%", e.Progress);
  }

  private static void CompletedCallback(IAsyncResult ar)
  {
    Console.WriteLine("Completed Callback!\n");
  }
}


using System;
using DeviceMgr;

// Sample of searching a specified IP range for Axis devices.
// NOTE: The DeviceMgr.dll reference and Bonjour.dll must exist in the same
// folder when running sample. Copying Bonjour.dll to output folder using
// post-build event can solve this.
class SearchRange
{
  static void Main(string[] args)
  {
    Discover discover = new Discover();

    // Add discovered device handler
    discover.DiscoverUpdate += DiscoveredDeviceCallback;

    // Add progress handler
    discover.ProgressUpdate += ProgressCallback;

    Console.WriteLine("Discovered devices:");

    // Start searching for devices
    IAsyncResult ar = discover.BeginSearchRange("10.84.154.60", "10.84.154.70",
      1000,  CompletedCallback, null);

    discover.EndSearchRange(ar);
  }

  private static void DiscoveredDeviceCallback(object sender,
    DiscoverEventArgs e)
  {
    DiscoveredDevice device = e.DiscoveredDevice;
    Console.WriteLine("{0}   {1}", device.SerialNumber, device.IPAddress);
  }

  private static void ProgressCallback(object sender, ProgressEventArgs e)
  {
    Console.WriteLine("Progress: {0}%", e.Progress);
  }

  private static void CompletedCallback(IAsyncResult ar)
  {
    Console.WriteLine("Completed Callback!\n");
  }
}


using System;
using DeviceMgr;

// Sample of getting a image snapshot from  a specific device.
class GetImage
{
  static void Main(string[] args)
  {
    // Enter IP address or hostname, user name and password
    ConnectionInfo connectionInfo = new ConnectionInfo("10.84.154.100",
      "root", "pass");

    Imaging imaging = new Imaging();

    // Add progress event handler
    imaging.ProgressUpdate += ProgressCallback;

    // Start getting the image
    IAsyncResult ar = imaging.BeginGetImage(connectionInfo, "1", "352x288",
      @"C:\snapshot.jpg", CompletedCallback, null);

    // Read result (saving the image on disk instead of reading the byte array)
    Result result;
    imaging.EndGetImage(ar, out result);

    Console.WriteLine("Result: {0}\n", result.Status);
  }

  private static void ProgressCallback(object sender, ProgressEventArgs e)
  {
    Console.Write("{0}%, ", e.Progress);
  }

  private static void CompletedCallback(IAsyncResult ar)
  {
    Console.WriteLine("Completed Callback!");
  }
}


using System;
using DeviceMgr;

// Sample of loading factory default on specific device.
class FactoryDefault
{
  static void Main(string[] args)
  {
    // Enter IP address or hostname, user name and password
    ConnectionInfo connectionInfo = new ConnectionInfo("10.84.154.100",
      "root", "pass");

    Maintenance maintenance = new Maintenance();

    // Add progress event handler
    maintenance.ProgressUpdate += ProgressCallback;

    // Start restarting device
    IAsyncResult ar = maintenance.BeginFactoryDefault(connectionInfo, false,
      CompletedCallback, null);

    // Read result
    Result result = maintenance.EndFactoryDefault(ar);
    Console.WriteLine("\nResult: {0}", result.Status);
  }

  private static void ProgressCallback(object sender, ProgressEventArgs e)
  {
    Console.Write("{0}%, ", e.Progress);
  }

  private static void CompletedCallback(IAsyncResult ar)
  {
    Console.WriteLine("Completed Callback!\n");
  }
}


using System;
using DeviceMgr;

// Sample of restarting a specific device.
class Restart
{
  static void Main(string[] args)
  {
    // Enter IP address or hostname, user name and password
    ConnectionInfo connectionInfo = new ConnectionInfo("10.84.154.100",
      "root", "pass");

    Maintenance maintenance = new Maintenance();

    // Add progress event handler
    maintenance.ProgressUpdate += ProgressCallback;

    // Start restarting device
    IAsyncResult ar = maintenance.BeginRestart(connectionInfo,
      CompletedCallback, null);

    // Read result
    Result result = maintenance.EndRestart(ar);
    Console.WriteLine("\nResult: {0}", result.Status);
  }

  private static void ProgressCallback(object sender, ProgressEventArgs e)
  {
    Console.Write("{0}%, ", e.Progress);
  }

  private static void CompletedCallback(IAsyncResult ar)
  {
    Console.WriteLine("Completed Callback!\n");
  }
}


using System;
using DeviceMgr;

// Sample of running Operations using a OperationMgr.
class RunOperation
{
  // The OperationMgr responsible for running the Operations
  static OperationMgr operationMgr = new OperationMgr();

  // Three devices to modify using Operations and OperationMgr
  static ConnectionInfo connectionInfo1 = new ConnectionInfo("10.84.154.100",
    "root", "pass");
  static ConnectionInfo connectionInfo2 = new ConnectionInfo("10.84.154.101",
    "root", "pass");

  static void Main(string[] args)
  {
    // Create the root operation (sequence)
    Operation rootOperation = OperationMgr.CreateSequenceOperation(false);

    // Add a parallel sub Operation setting parameters
    rootOperation.Add(CreateSetParameterOperation());

    // Add a parallel sub Operation setting a new user
    rootOperation.Add(CreateSetUserOperation());

    // Add progress event handler
    operationMgr.ProgressUpdate += ProgressCallback;

    // Start running the Operations
    IAsyncResult ar = operationMgr.BeginOperation(rootOperation,
      CompletedCallback, "state");

    // Read result
    ResultList resultList = operationMgr.EndOperation(ar);

    // Print the result
    PrintResultList(resultList);
  }

  private static Operation CreateSetParameterOperation()
  {
    // Create a parameter list containing parameter names
    ParameterList parameterList = new ParameterList();
    parameterList.Add(new Parameter("Image.I0.Text.TextEnabled", "yes"));
    parameterList.Add(new Parameter("Image.I0.Text.String",
      "Testing ACM SDK sample"));

    // Create and add the Set parameter function (parallel)
    Operation operation = OperationMgr.CreateParallelOperation();
    Config.AddSet(operation, connectionInfo1, parameterList,
      "set param on connectionInfo1");
    Config.AddSet(operation, connectionInfo2, parameterList,
      "set param on connectionInfo2");

    return operation;
  }

  private static Operation CreateSetUserOperation()
  {
    // Create user to set in the device
    User newUser = new User("testUser", "pass", AccessRight.Viewer,
      PtzRight.Ptz);

    // Create and add the Set user function  (parallel)
    Operation operation = OperationMgr.CreateParallelOperation();
    UserManagement.AddSetUser(operation, connectionInfo1, newUser,
      "set user on connectionInfo1");
    UserManagement.AddSetUser(operation, connectionInfo2, newUser,
      "set user on connectionInfo2");

    return operation;
  }

  private static void ProgressCallback(object sender, ProgressEventArgs e)
  {
    Console.Write("{0}%, ", e.Progress);
  }

  private static void CompletedCallback(IAsyncResult ar)
  {
    Console.WriteLine("Completed Callback! State: \"{0}\"", ar.AsyncState);
  }

  private static void PrintResultList(ResultList resultList)
  {
    Console.WriteLine();

    foreach (Result result in resultList)
    {
      Console.WriteLine("Address: {0}:", result.ConnectionInfo.Address);
      Console.WriteLine("   Result: {0}", result.Status);
      Console.WriteLine("   State: \"{0}\"", result.AsyncState);
    }

    Console.WriteLine();
  }
}


using System;
using DeviceMgr;

// Sample of deciding if an IP address is used or not.
class PingAddress
{
  static void Main(string[] args)
  {
    // Enter IP address or hostname
    ConnectionInfo connectionInfo = new ConnectionInfo("10.84.154.100");

    Pinger pinger = new Pinger();

    // Start restarting device
    IAsyncResult ar = pinger.BeginPing(connectionInfo, null, null);

    // Read result
    Result result = pinger.EndPing(ar);

    // Print result in console
    Console.WriteLine("Result when pinging \"{0}\": {1}\n",
      connectionInfo.Address, result.Status);
  }
}


using System;
using DeviceMgr;

// Sample of monitoring the status of a specific device.
class CheckStatus
{
  static void Main(string[] args)
  {
    // Enter IP address or hostname, user name and password
    ConnectionInfo connectionInfo = new ConnectionInfo("10.84.154.100",
      "root", "pass");

    Status status = new Status();

    // Add status event handler
    status.StatusUpdate += StatusCallback;

    // Set check intervall (default 120000 ms = 2 min)
    status.CheckIntervall = 5000;

    Console.WriteLine("Start monitoring...");

    // Start monitoring a specific ConnectionInfo
    status.Add(connectionInfo, null);

    System.Threading.Thread.Sleep(60000);
  }

  private static void StatusCallback(object sender, StatusEventArgs e)
  {
    Console.WriteLine("{0}  Address: {1}, Alive: {2}",
      DateTime.Now.ToString("T"),  e.ConnectionInfo.Address, e.IsAlive ? "Yes" : "No");
  }
}


using System;
using DeviceMgr;

// Sample of applying a template to a Axis devices.
class ApplyTemplate
{
  static void Main(string[] args)
  {
    // Enter IP address or hostname, user name and password
    ConnectionInfo connectionInfo = new ConnectionInfo("10.84.154.100",
      "root", "pass");

    Template template = new Template();

    // Add progress handler
    template.ProgressUpdate += ProgressCallback;

    string templateToApply = CreateTemplate();

    // Start setting the date and time on device
    IAsyncResult ar = template.BeginApplyTemplate(connectionInfo,
      templateToApply, CompletedCallback, null);

    // Read the result
    Result result = template.EndApplyTemplate(ar);

    Console.WriteLine("\nResult: {0}\n", result.Status);
  }

  private static string CreateTemplate()
  {
    // Set two parameters
    string template =
      "[Image.I0.Text]\r\n" +
      "TextEnabled = \"yes\"\r\n" +                // Image.I0.Text.TextEnabled
      "String = \"Testing ACM SDK sample\"\r\n";  // Image.I0.Text.String

    // Set new user
    template +=  string.Format(
      "[]\r\n" +                                  // Clear namespace
      "{0}({1} = \"{2}\", {3} = \"{4}\", {5} = \"{6}\", {7} = \"{8}\")",
      TemplateConst.UserManagement_Set_Name,
      TemplateConst.UserManagement_Param_Username, "testUser",
      TemplateConst.UserManagement_Param_Password, "pass",
      TemplateConst.UserManagement_Param_Usergroup,
      TemplateConst.UserManagement_Value_Usergroup_Viewer,
      TemplateConst.UserManagement_Param_Ptz,
      TemplateConst.UserManagement_Value_Ptz_Yes);

    return template;
  }

  private static void ProgressCallback(object sender, ProgressEventArgs e)
  {
    Console.Write("{0}%, ", e.Progress);
  }

  private static void CompletedCallback(IAsyncResult ar)
  {
    Console.WriteLine("Completed Callback!");
  }
}


using System;
using DeviceMgr;

// Sample of updating and downloading available software from Axis web site.
class UpdateAndDownloadSoftware
{
  static void Main(string[] args)
  {
    string myAxisUsername = "username@mail.com";  // Enter your MyAxis username
    string myAxisPassword = "password";            // Enter your MyAxis password

    Update update = new Update();

    // Add progress event handler
    update.ProgressUpdate += ProgressCallback;

    AvailableSoftware availableSoftware = GetAvailableSoftware(update,
      myAxisUsername, myAxisPassword);

    // Cancel if there are no available software (e.g. due to no contact)
    if (availableSoftware == null)
    {
      return;
    }

    DownloadSoftware(update, availableSoftware, myAxisUsername, myAxisPassword);
  }

  private static AvailableSoftware GetAvailableSoftware(Update update,
    string myAxisUsername, string myAxisPassword)
  {
    Console.WriteLine("Updating available software:");

    // Start getting the available software from Axis web site using the
    // MyAxis e-mail and password. Register to MyAxis at
    // http://www.axis.com/r/?keyword=twregister
    IAsyncResult ar = update.BeginGetAvailableSoftware(myAxisUsername,
      myAxisPassword, null, null);

    // Wait for the operation to finish and read the available software
    Result result;
    AvailableSoftware availableSoftware = update.EndGetAvailableSoftware(ar, out result);

    Console.WriteLine("\nUpdate result: {0}\n", result.Status);

    if (availableSoftware != null)
    {
      // Print the result and the available software
      PrintAvailableSoftware(result, availableSoftware);
    }

    return availableSoftware;
  }

  private static void DownloadSoftware(Update update,
    AvailableSoftware availableSoftware,
    string myAxisUsername, string myAxisPassword)
  {
    Console.WriteLine("\nDownloading software:");

    // Download a software
    Software software = availableSoftware.ProductList[0].GetLatestVersion();
    IAsyncResult ar = update.BeginDownload(software, @"c:\firmware.bin",
      myAxisUsername,  myAxisPassword, null, null);

    // Wait for the operation to finish
    Result result = update.EndDownload(ar);

    Console.WriteLine("\nResult: {0}\n", result.Status);
  }

  private static void ProgressCallback(object sender, ProgressEventArgs e)
  {
    Console.Write("{0}%, ", e.Progress);
  }

  private static void PrintAvailableSoftware(Result result,
    AvailableSoftware availableSoftware)
  {
    Console.WriteLine("Available software (last modified {0}):",
      availableSoftware.Date);

    foreach (Product product in availableSoftware.ProductList)
    {
      Console.WriteLine("\nProduct: {0}", product.Name);

      foreach (Software software in product.SoftwareList)
      {
        Console.WriteLine("   version: {0}", software.Version);
      }
    }
  }
}


using System;
using DeviceMgr;

// Sample of upgrading a device with a specific firmware.
class UpgradeDevice
{
  public static System.Threading.ManualResetEvent allDone;

  static void Main(string[] args)
  {
    allDone = new System.Threading.ManualResetEvent(false);

    // Enter IP address or hostname, user name and password
    ConnectionInfo connectionInfo = new ConnectionInfo("10.84.154.100",
      "root", "pass");

    Upgrade upgrade = new Upgrade();

    // Add progress event handler
    upgrade.ProgressUpdate += ProgressCallback;

    // Start upgrading device
    IAsyncResult ar = upgrade.BeginUpgrade(connectionInfo,
      @"C:\compatibleFirmware.bin", false,
      CompletedCallback, new RequestState(upgrade, connectionInfo));

    // Wait until the ManualResetEvent is set in CompletedCallback so that the
    // application does not exit until after the CompletedCallback is called.
    allDone.WaitOne();
    }

  private static void ProgressCallback(object sender, ProgressEventArgs e)
  {
    Console.Write("{0}%, ", e.Progress);
  }

  private static void CompletedCallback(IAsyncResult ar)
  {
    Upgrade upgrade = ((RequestState)ar.AsyncState).Upgrade;
    ConnectionInfo connectionInfo = ((RequestState)ar.AsyncState).ConnectionInfo;

    // Read result
    Result result;
    upgrade.EndUpgrade(ar, out result);

    Console.WriteLine("\n\nAddress: {0}", connectionInfo.Address);
    Console.WriteLine("Result: {0}", result.Status);
    Console.WriteLine("New firmware version: {0}\n", Upgrade.GetFirmwareVersion(result));

    // Set the ManualResetEvent so the main thread can exit
    allDone.Set();
  }

  class RequestState
  {
    public Upgrade Upgrade;
    public ConnectionInfo ConnectionInfo;

    public RequestState(Upgrade upgrade, ConnectionInfo connectionInfo)
    {
      Upgrade = upgrade;
      ConnectionInfo = connectionInfo;
    }
  }
}


using System;
using DeviceMgr;

// Sample of getting existing users from a specific device.
class GetUsers
{
  static void Main(string[] args)
  {
    // Enter IP address or hostname, user name and password
    ConnectionInfo connectionInfo = new ConnectionInfo("10.84.154.100",
      "root", "pass");

    UserManagement userManagement = new UserManagement();

    // Start getting existing users from device
    IAsyncResult ar = userManagement.BeginGetUsers(connectionInfo, null, null);

    // Read existing users
    UserList userList;
    Result result = userManagement.EndGetUsers(ar, out userList);

    // Print result and users in console
    PrintResult(result, userList);
  }

  private static void PrintResult(Result result, UserList userList)
  {
    Console.WriteLine("Result: {0}", result.Status);

    if (userList != null)
    {
      Console.WriteLine("Existing users:\n");

      foreach (User user in userList)
      {
        Console.WriteLine(user.ToString());
      }
    }

  }
}


using System;
using DeviceMgr;

// Sample of removing a user from a specific device.
class RemoveUser
{
  static void Main(string[] args)
  {
    // Enter IP address or hostname, user name and password
    ConnectionInfo connectionInfo = new ConnectionInfo("10.84.154.100",
      "root", "pass");

    UserManagement userManagement = new UserManagement();

    // Start remove user from device
    IAsyncResult ar = userManagement.BeginRemoveUser(connectionInfo,
      "testUser", null, null);

    // Read result
    Result result = userManagement.EndRemoveUser(ar);
    Console.WriteLine("Result: {0}\n", result.Status);
  }
}


using System;
using DeviceMgr;

// Sample of adding or modifying a user depending on if it already exists or not.
class SetUser
{
  static void Main(string[] args)
  {
    // Enter IP address or hostname, user name and password
    ConnectionInfo connectionInfo = new ConnectionInfo("10.84.154.100",
      "root", "pass");

    UserManagement userManagement = new UserManagement();

    // Create user to set in the device
    User newUser = new User("testUser", "pass", AccessRight.Viewer,
      PtzRight.Ptz);

    // Start setting user
    IAsyncResult ar = userManagement.BeginSetUser(connectionInfo, newUser,
      null, null);

    // Read result
    Result result = userManagement.EndSetUser(ar);
    Console.WriteLine("Result: {0}\n", result.Status);
  }
}