---
title: roPtp
slug: develop/roptp
docTags: 
createdAt: 2025-03-11T07:07:18.732Z
---

This object can be used to retrieve information about the network PTP state of the player. The JavaScript equivalent is [hostconfiguration](docId\:P1DkloQhLM9wxsSwmPeeK).

Object Creation: This object is created with no additional parameters.

```text
ptp = CreateObject("roPtp")
```

## ifUserData

### SetUserData(user\_data As Object)

Sets the user data that will be returned when events are raised.

### GetUserData() As Object

Returns the user data that has previously been set via `SetUserData()`. It will return `Invalid` if no data has been set.

## ifMessagePort

### SetPort(port As roMessagePort)

Posts messages of the type *roPtpEvent* to the attached message port.

## ifPtp

### GetPtpStatus() As roAssociativeArray

Returns an associative array containing information about the network PTP state of the player:

- `state`: A string indicating the current PTP state of the player. Values can be "MASTER", "SLAVE", or "UNCALIBRATED".
- `timestamp`: A value indicating when the PTP state was last changed. This value is measured in seconds since the player booted. This value can be compared against the total uptime of the player, which is retrieved by calling `UpTime(0)`.

