Difference between revisions of "APT:ReceiveParameter"

From 3dbrew
Jump to navigation Jump to search
 
(3 intermediate revisions by 2 users not shown)
Line 9: Line 9:
 
|-
 
|-
 
| 1
 
| 1
| AppID
+
| [[NS_and_APT_Services#AppIDs|AppID]]
 
|-
 
|-
 
| 2
 
| 2
| Parameter buffer size, max size is 0x1000(this can be zero).
+
| Parameter Size (max is 0x1000)
 
|}
 
|}
  
 
+
The following is located 0x100-bytes after the beginning of the above command buffer, as a static buffer descriptor receiving the static buffer in the response:
The following is located 0x100-bytes after the beginning of the above command buffer:
 
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 23: Line 22:
 
|-
 
|-
 
| 0
 
| 0
| <nowiki>(Size<<14) | 2</nowiki>
+
| <nowiki>(Parameter Size << 14) | 2</nowiki>
 
|-
 
|-
 
| 1
 
| 1
| Output parameter buffer ptr
+
| void*, Parameter Output
 
|}
 
|}
  
Line 36: Line 35:
 
|-
 
|-
 
| 0
 
| 0
| Header code
+
| Header code [0x000D0104]
 
|-
 
|-
 
| 1
 
| 1
Line 42: Line 41:
 
|-
 
|-
 
| 2
 
| 2
| AppID of the process which [[APT:SendParameter|sent]] these parameters.
+
| Sender [[NS_and_APT_Services#AppIDs|AppID]]
 
|-
 
|-
 
| 3
 
| 3
| Signal type
+
| [[NS_and_APT_Services#Command|Command]]
 
|-
 
|-
 
| 4
 
| 4
| Actual parameter buffer size, this is <= to the the input size.
+
| Actual Parameter Size
 
|-
 
|-
 
| 5
 
| 5
| Value 0x10
+
| 0x10 (Move handle descriptor)
 
|-
 
|-
 
| 6
 
| 6
| Handle from the source process which set the parameters, this handle is likely used for shared memory(this can be 0x0).
+
| Handle Parameter
 
|-
 
|-
 
| 7
 
| 7
| <nowiki>(Size<<14) | 2</nowiki>
+
| <nowiki>(Actual Parameter Size << 14) | 2</nowiki> (static buffer descriptor)
 
|-
 
|-
 
| 8
 
| 8
| Output parameter buffer ptr
+
| void*, Parameter to send
 
|}
 
|}
  
 
=Description=
 
=Description=
 
This returns the current parameter data from NS state, from the source process which set the parameters. Once finished, NS will clear a flag in the NS state so that this command will return an error if this command is used again if parameters were not set again.
 
This returns the current parameter data from NS state, from the source process which set the parameters. Once finished, NS will clear a flag in the NS state so that this command will return an error if this command is used again if parameters were not set again.
This is called when the second [[APTU:Initialize|Initialize]] event is triggered. It returns a signal type indicating why it was triggered.
+
This is called when the second [[APT:Initialize]] event is triggered. It returns a signal type indicating why it was triggered.
 
 
{| class="wikitable" border="1"
 
|-
 
!  Type
 
!  Description
 
|-
 
| 0x1
 
| Application just started
 
|-
 
| 0x3
 
| Returned from library applet
 
|-
 
| 0xB
 
| Returned to application
 
|-
 
| 0xC
 
| Exiting application
 
|-
 
| 0xF
 
| ?
 
|}
 

Latest revision as of 14:24, 7 August 2016

Request[edit]

Index Word Description
0 Header code [0x000D0080]
1 AppID
2 Parameter Size (max is 0x1000)

The following is located 0x100-bytes after the beginning of the above command buffer, as a static buffer descriptor receiving the static buffer in the response:

Index Word Description
0 (Parameter Size << 14) | 2
1 void*, Parameter Output

Response[edit]

Index Word Description
0 Header code [0x000D0104]
1 Result code
2 Sender AppID
3 Command
4 Actual Parameter Size
5 0x10 (Move handle descriptor)
6 Handle Parameter
7 (Actual Parameter Size << 14) | 2 (static buffer descriptor)
8 void*, Parameter to send

Description[edit]

This returns the current parameter data from NS state, from the source process which set the parameters. Once finished, NS will clear a flag in the NS state so that this command will return an error if this command is used again if parameters were not set again. This is called when the second APT:Initialize event is triggered. It returns a signal type indicating why it was triggered.