nl::Weave::WeaveServerBase

#include <src/lib/core/WeaveServerBase.h>

Weave 프로필 요청하지 않은 응답자 (서버)를 구현하기 위한 일반적인 기본 객체로, 인증된 요청의 유효성 검사와 상태 보고서를 캡슐화하고 패브릭 상태와 교환 관리자를 위한 공통 데이터 멤버 저장소를 제공합니다.

요약

상속

직접 알려진 서브클래스: <ph type="x-smartling-placeholder">
</ph>   nl::Weave::Profiles::DeviceControl::DeviceControlServer <ph type="x-smartling-placeholder">
</ph>   nl::Weave::Profiles::DeviceDescription::DeviceDescriptionServer <ph type="x-smartling-placeholder">
</ph>   nl::Weave::Profiles::Echo_Next::WeaveEchoServer <ph type="x-smartling-placeholder">
</ph>   nl::Weave::Profiles::FabricProvisioning::FabricProvisioningServer <ph type="x-smartling-placeholder">
</ph>   nl::Weave::Profiles::Heartbeat::WeaveHeartbeatReceiver <ph type="x-smartling-placeholder">
</ph>   nl::Weave::Profiles::NetworkProvisioning::NetworkProvisioningServer <ph type="x-smartling-placeholder">
</ph>   nl::Weave::Profiles::ServiceProvisioning::ServiceProvisioningServer <ph type="x-smartling-placeholder">
</ph>   nl::Weave::Profiles::TokenPairing::TokenPairingServer <ph type="x-smartling-placeholder">
</ph>   nl::Weave::Profiles::Vendor::Nestlabs::DropcamLegacyPairing::DropcamLegacyPairingServer <ph type="x-smartling-placeholder">
</ph>   nl::Weave::Profiles::WeaveEchoServer

공개 속성

ExchangeMgr
[읽기 전용] Exchange 관리자 객체
FabricState
[읽기 전용] Fabric 상태 객체

공개 정적 함수

SendStatusReport(ExchangeContext *ec, uint32_t statusProfileId, uint16_t statusCode, WEAVE_ERROR sysError)
지정된 프로필 및 시스템 오류의 상태 코드를 포함하는 지정된 교환의 시작자에게 기본 메시지 플래그가 포함된 Weave 상태 보고서를 보냅니다.
SendStatusReport(ExchangeContext *ec, uint32_t statusProfileId, uint16_t statusCode, WEAVE_ERROR sysError, uint16_t sendFlags)
지정된 프로필 및 시스템 오류의 상태 코드를 포함하는 지정된 교환의 시작자에게 제공된 메시지 플래그와 함께 Weave 상태 보고서를 보냅니다.

보호된 함수

EnforceAccessControl(ExchangeContext *ec, uint32_t msgProfileId, uint8_t msgType, const WeaveMessageInfo *msgInfo, WeaveServerDelegateBase *delegate)
bool
Weave 서버로 수신되는 요청 메시지를 수락 또는 삭제할지 여부를 결정합니다.
WeaveServerBase(void)

공개 속성

ExchangeMgr

WeaveExchangeManager * ExchangeMgr

[읽기 전용] Exchange 관리자 객체

FabricState

WeaveFabricState * FabricState

[읽기 전용] Fabric 상태 객체

공개 정적 함수

SendStatusReport

WEAVE_ERROR SendStatusReport(
  ExchangeContext *ec,
  uint32_t statusProfileId,
  uint16_t statusCode,
  WEAVE_ERROR sysError
)

지정된 프로필 및 시스템 오류의 상태 코드를 포함하는 지정된 교환의 시작자에게 기본 메시지 플래그가 포함된 Weave 상태 보고서를 보냅니다.

세부정보
매개변수
[in] ec
상태 보고서를 전송할 거래소 컨텍스트에 대한 포인터입니다.
[in] statusProfileId
지정된 상태 코드의 프로필입니다.
[in] statusCode
전송할 상태 코드입니다.
[in] sysError
상태 코드와 관련되거나 관련 있는 시스템 오류입니다.

SendStatusReport

WEAVE_ERROR SendStatusReport(
  ExchangeContext *ec,
  uint32_t statusProfileId,
  uint16_t statusCode,
  WEAVE_ERROR sysError,
  uint16_t sendFlags
)

지정된 프로필 및 시스템 오류의 상태 코드가 포함된 지정된 교환의 시작자에게 제공된 메시지 플래그와 함께 Weave 상태 보고서를 보냅니다.

세부정보
매개변수
[in] ec
상태 보고서를 전송할 거래소 컨텍스트에 대한 포인터입니다.
[in] statusProfileId
지정된 상태 코드의 프로필입니다.
[in] statusCode
전송할 상태 코드입니다.
[in] sysError
상태 코드와 관련되거나 관련 있는 시스템 오류입니다.
[in] sendFlags
전송 중인 Weave 상태 보고서에 대해 애플리케이션에서 설정한 플래그입니다.

보호된 함수

EnforceAccessControl

bool EnforceAccessControl(
  ExchangeContext *ec,
  uint32_t msgProfileId,
  uint8_t msgType,
  const WeaveMessageInfo *msgInfo,
  WeaveServerDelegateBase *delegate
)

Weave 서버로 수신되는 요청 메시지를 수락 또는 삭제할지 여부를 결정합니다.

이 메서드는 수신 요청 메시지에 대한 확장 가능한 액세스 제어 정책을 구현하기 위해 Weave 서버 구현에서 사용되도록 고안되었습니다. 대리자 객체에 의존하는 서버 구현은 메시지 처리 초기에 이 메서드를 호출하여 메시지 처리를 계속해야 하는지 여부를 결정해야 합니다.

이 메서드는 제공된 위임에서 가상 WeaveServerDelegateBase::EnforceAccessControl() 메서드를 호출하여 메시지의 액세스 제어 정책을 평가합니다. Weave 서버 대리자 클래스와 표준 서버 클래스에서 파생된 애플리케이션별 대리자는 가상 메서드를 재정의하여 특정 액세스 제어 정책을 적용해야 합니다.

세부정보
매개변수
[in] ec
메일이 수신된 ExchangeContext입니다.
[in] msgProfileId
수신된 메시지의 프로필 ID입니다.
[in] msgType
수신된 메시지의 메시지 유형입니다.
[in] msgInfo
수신된 메시지에 대한 정보가 포함된 WeaveMessageInfo 구조입니다.
[in] delegate
애플리케이션에서 제공하는 위임 객체로, 기본 메시지 액세스 제어 정책을 재정의하는 데 사용할 수 있습니다.
반환 값
true
메시지가 정상적으로 수락되고 처리되어야 하는지 여부
false
메시지 처리를 중지하고 메시지를 삭제해야 하는 경우 을 삭제해야 합니다.

WeaveServerBase

 WeaveServerBase(
  void
)