hololinked.metadata.td.interaction_affordance.PropertyAffordance
Bases: DataSchema, InteractionAffordance, PropertyMetadata
Implements property affordance schema from Property descriptor object.
Source code in repo/hololinked/hololinked/metadata/td/interaction_affordance.py
318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 | |
Attributes
event_unique_identifier
property
Unique identifier for the change event of an observable property.
Functions
to_descriptor
to_descriptor(fget: Callable | None = None, fset: Callable | None = None, delegate: PropertyDelegate | None = None, validator: str = 'pydantic') -> Property
Create the Property this affordance describes.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
Callable | None
|
read handler, the value is stored on the |
None
|
|
Callable | None
|
write handler, receives the validated value |
None
|
|
PropertyDelegate | None
|
reads and writes an attribute of another object, used instead of |
None
|
|
str
|
name the validator of the value is registered under with |
'pydantic'
|
Returns:
| Type | Description |
|---|---|
Property
|
the descriptor, not yet assigned to a class |
Raises:
| Type | Description |
|---|---|
ValueError
|
if the value is stored (no |
Source code in repo/hololinked/hololinked/metadata/td/interaction_affordance.py
358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 | |
TD Supported Fields
Apart from the fields supported InteractionAffordance and DataSchema,
the following is supported
| field | supported | meaning | default usage |
|---|---|---|---|
| observable | ✔️ | true if Property pushes change events |
Property.observable value |