AllJoynManagement 云解决方案提供商AllJoynManagement CSP

AllJoynManagement 配置服务提供程序 (CSP) 允许 IT 管理员枚举连接到 AllJoyn 总线的 AllJoyn 设备。The AllJoynManagement configuration service provider (CSP) allows an IT administrator to enumerate the AllJoyn devices that are connected to the AllJoyn bus. 设备必须支持 Microsoft AllJoyn 配置接口 (com.microsoft.alljoynmanagement.config) 。The devices must support the Microsoft AllJoyn configuration interface (com.microsoft.alljoynmanagement.config). 还可以将配置文件推送到相同的设备。You can also push configuration files to the same devices. 若要在设置新配置时填充各种节点,建议先执行查询,获取所有附加设备中所有节点的实际值。To populate the various nodes when setting new configuration, we recommend that you do a query first, to get the actual values for all the nodes in all the attached devices. 然后,您可以使用查询中的信息在推送新配置时设置节点值。You can then use the information from the query to set the node values when pushing the new configuration.

备注

AllJoynManagement 配置服务提供程序 (CSP) 仅在 Windows 10 IoT 核心 (IoT 核心) 。The AllJoynManagement configuration service provider (CSP) is only supported in Windows 10 IoT Core (IoT Core).

此 CSP 已添加到 Windows 10 版本 1511 中。This CSP was added in Windows 10, version 1511.

对于防火墙设置,请注意 PublicProfile 和 PrivateProfile 是互斥的。For the firewall settings, note that PublicProfile and PrivateProfile are mutually exclusive. 必须在设备本身上直接设置专用配置文件,并且唯一受支持的操作是 Get。The Private Profile must be set on the directly on the device itself, and the only supported operation is Get. 对于 PublicProfile,支持 Add 和 Get。For PublicProfile, both Add and Get are supported. 此 CSP 旨在与 AllJoyn 设备系统桥结合使用,了解桥将有助于确定何时以及如何使用此 CSP。This CSP is intended to be used in conjunction with the AllJoyn Device System Bridge, and an understanding of the bridge will help when determining when and how to use this CSP. 有关详细信息,请参阅Device System Bridge (DSB) ProjectAllJoyn Device System Bridge。For more information, see Device System Bridge (DSB) Project and AllJoyn Device System Bridge.

下面以树格式显示 AllJoynManagement 配置服务提供程序The following shows the AllJoynManagement configuration service provider in tree format

./Vendor/MSFT
AllJoynManagement
----Configurations
--------ServiceID
------------Port
----------------PortNum
--------------------ConfigurableObjects
------------------------CfgObjectPath
----Credentials
--------ServiceID
------------Key
----Firewall
--------PublicProfile
--------PrivateProfile
----Services
--------ServiceID
------------AppId
------------DeviceId
------------AppName
------------Manufacturer
------------ModelNumber
------------Description
------------SoftwareVersion
------------AJSoftwareVersion
------------HardwareVersion
----Options
--------QueryIdleTime

以下列表描述了特征和参数。The following list describes the characteristics and parameters.

./Vendor/MSFT/AllJoynManagement AllJoynManagement 配置服务提供程序的根节点。./Vendor/MSFT/AllJoynManagement The root node for the AllJoynManagement configuration service provider.

服务 在 AllJoyn 总线上发现的所有 AllJoyn 对象的列表。Services List of all AllJoyn objects that are discovered on the AllJoyn bus. 包含所有公开"com.microsoft.alljoynmanagement.config"的 AllJoyn 对象。All AllJoyn objects that expose the "com.microsoft.alljoynmanagement.config" are included.

服务/ 节点名称 唯一的 AllJoyn 设备 ID (一个 GUID) 托管一个或多个可配置对象的 GUID。Services/Node name The unique AllJoyn device ID (a GUID) that hosts one or more configurable objects.

服务/节点名称/端口 AllJoyn 对象用于通信配置设置的端口集。Services/Node name/Port The set of ports that the AllJoyn object uses to communicate configuration settings. 通常只有一个端口用于通信,但可以指定其他端口。Typically only one port is used for communication, but it is possible to specify additional ports.

服务/节点名称/端口/ 节点名称 用于通信的端口号。Services/Node name/Port/Node name Port number used for communication. 这由可配置的 AllJoyn 对象指定,并在此处反映出来。This is specified by the configurable AllJoyn object and reflected here.

Services/Node name/Port/ Nodename/CfgObject AllJoyn 对象的端口上可用的可配置接口集。Services/Node name/Port/Node name/CfgObject The set of configurable interfaces that are available on the port of the AllJoyn object.

Services/Node name/Port/ Nodename/CfgObject/ Node name 此 URI 的其余部分是由父 ServiceID 托管且可由父 PortNum 访问的可配置 ** AllJoyn 对象的转义路径。Services/Node name/Port/Node name/CfgObject/Node name The remainder of this URI is an escaped path to the configurable AllJoyn object hosted by the parent ServiceID and accessible by the parent PortNum.

例如,在 URI 中将具有 Microsoft 特定 AllJoyn 配置接口"\FabrikamService\BridgeConfig"的 AllJoyn Bridge 指定为:%2FFabrikamService%2FBridgeConfig。For example an AllJoyn Bridge with the Microsoft specific AllJoyn configuration interface "\FabrikamService\BridgeConfig" would be specified in the URI as: %2FFabrikamService%2FBridgeConfig.

凭据 这是凭据存储。Credentials This is the credential store. 管理员可以为此节点需要身份验证的每个 AllJoyn 设备设置凭据。An administrator can set credentials for each AllJoyn device that requires authentication at this node.

当 SyncML 请求到达 CSP 以替换或查询需要身份验证的 AllJoyn 对象上的配置项时,CSP 将使用身份验证阶段中存储在此处的凭据。When a SyncML request arrives in the CSP to replace or query a configuration item on an AllJoyn object that requires authentication, then the CSP uses the credentials stored here during the authentication phase.

凭据/ 节点名称 这是在 \AllJoynManagement\Services\ServiceID URI 中指定的相同服务 ID。Credentials/Node name This is the same service ID specified in \AllJoynManagement\Services\ServiceID URI. 它通常作为 GUID 实现。It is typically implemented as a GUID.

Credentials/Node name/Key 符合 AllJoyn SRP KEYX 身份验证标准的字母数字键值。Credentials/Node name/Key An alphanumeric key value that conforms to the AllJoyn SRP KEYX authentication standard.

防火墙 AllJoyn 服务的防火墙设置。Firewall Firewall setting for the AllJoyn service.

Firewall/PublicProfile 用于为公共网络配置文件启用或禁用 AllJoyn (AJRouter.dll) 的布尔值。Firewall/PublicProfile Boolean value to enable or disable the AllJoyn router service (AJRouter.dll) for public network profile.

Firewall/PrivateProfile 指示是否对专用网络配置文件 (AJRouter.dll) AllJoyn 路由器服务服务的布尔值。Firewall/PrivateProfile Boolean value indicating whether AllJoyn router service (AJRouter.dll) is enabled for private network profile.

示例Examples

设置适配器配置Set adapter configuration

<?xml version="1.0" encoding="utf-8"?>
SyncML xmlns="SYNCML:SYNCML1.2">
  <SyncBody>
    <Replace>
      <CmdID>2</CmdID>
      <Item>
        <Target>
          <LocURI>./Vendor/MSFT/AllJoynManagement/Services/_ALLJOYN_DEVICE_ID_/Port/27/Configuration/%2FDSBService%2FAdapterConfig</LocURI>
        </Target>
       <Meta>
          <Format xmlns="syncml:metinf">b64</Format>
        </Meta>       <Data>PAA/AHgAbQBsACAAdgBlAHIAcwBpAG8AbgA9ACIAMQAuADAAIgA/AD4ADQAKADwAQgBhAGMATgBlAHQAQwBmAGcAPgANAAoACQA8AEIAQgBNAEQAUwBlAHIAdgBlAHIAPgANAAoACQAJADwASQBQAEEAZABkAHIAZQBzAHMAPgAxADIANwAuADAALgAwAC4AMQA8AC8ASQBQAEEAZABkAHIAZQBzAHMAPgANAAoACQAJADwAUABvAHIAdAA+ADQANwA4ADAAOAA8AC8AUABvAHIAdAA+AA0ACgAJADwALwBCAEIATQBEAFMAZQByAHYAZQByAD4ADQAKADwALwBCAGEAYwBOAGUAdABDAGYAZwA+AA0ACgAAAA==</Data>
       </Item>
    </Replace>
    <Final/>
  </SyncBody>
</SyncML>

应该将 _ALLJOYN_DEVICE_ID_ 替换为实际设备 ID。You should replace _ALLJOYN_DEVICE_ID_ with an actual device ID. 请注意,数据是所设置的配置文件的 Base64 编码表示形式。Note that the data is base-64 encoded representation of the configuration file that you are setting.

获取 PIN 数据Get PIN data

<?xml version="1.0" encoding="utf-8"?>
<SyncML xmlns="SYNCML:SYNCML1.2">
  <SyncBody>
    <Get>
      <CmdID>2</CmdID>
      <Item>
        <Target>
          <LocURI>./Vendor/MSFT/AllJoynManagement/Credentials?list=StructData</LocURI>
        </Target>
      </Item>
    </Get>
    <Final/>
  </SyncBody>
</SyncML>

获取防火墙 PrivateProfileGet the firewall PrivateProfile

<SyncML xmlns="SYNCML:SYNCML1.2">
  <SyncBody>
              <Get>
                <CmdID>1</CmdID>
                <Item>
                     <Target>
                       <LocURI>./Vendor/MSFT/AllJoynManagement/Firewall/PrivateProfile</LocURI>
                     </Target>
                </Item>
              </Get>
     <Final/>
  </SyncBody>
</SyncML>