In simulink, Can bus selector select multi-dimensional elements? - multidimensional-array

Can I use bus selector for multi-dimensional elements like attached? If not, how can I seperate elements? I used functioncaller as input so I can only use one dimensional bus.
bus

Related

Relation between entries in node and children in glTF 2.0

I'm writing a reader for glTF/GLB files in R. Reading through the spec at https://www.khronos.org/registry/glTF/specs/2.0/glTF-2.0.html, the relation between nodes and their children is unclear to me.
A node may have properties defining the transform (matrix, rotation, scale, translation). Do its children inherit this transform? If they specify their own transform, does it replace the parent one, or is it composed with it?
It also may have a camera spec. If the child has one as well, does it replace the parent one, or are they combined somehow?
The child node's transformation is always composed with the parent one. For example, if the parent had a +5 X translation, and the child had a 90deg Y rotation, the resulting child mesh would be positioned at +5 X with the rotated orientation.
Note that matrix is mutually exclusive with the other three (translation, rotation, scale), so a given node must not mix matrix with any of the other forms of transformation. However, a parent could use matrix with children that use the other 3 transforms, or vice versa.
Typically camera appears on a leaf node, although that's not required. If a parent and child both have camera objects, they are considered two separate cameras, although the child's camera will move when the parent is repositioned.
If you get glTF working in R, please let us know with an issue or PR for https://github.com/KhronosGroup/glTF-Project-Explorer, thanks!

Best way to query an array of structures using BLE

What is the best way to design a GATT characteristic/service to allow querying an array of similar objects?
For example, lets say I want my device to present the set of all network neighbors (discovered through a mechanism beyond the scope of this question).
With a traditional management interface, I would probably use a get-first/get-next interface to walk the list. Or I'd have one call to get a list of identifiers and then a get call to get the details corresponding to one identifier.
But BLE GATT doesn't seem to have direct support for this.
I could make a characteristic return the entire array of objects, but that has the potential to be very large.
I could also make a characteristic to get a list of identifiers, but then how would I get the details for one object? Maybe write it to a characteristic that will cause the device to send the results via a notification/indication?
I don't think it would be right to define a characteristic that, when read, returns the details of an object previously specified by writing to a different characteristic. I'm sure this could be done, but it doesn't seem to fit within the spirit of how GATT is expected to operate.

Clarification of - Attributes, Characteristics, Services and profiles [duplicate]

I would like to know what is the difference between attributes and service in GATT in BLE specification, and where we can find attributes, are they in service, characteristics or in descriptors?
In summary ... services, characteristics, and descriptors ... are attributes :-)
The BLE standard provides the ATT protocol that defines the concept of attributes. All attributes are defined inside a table and they have a handle, a type (with a UUID), a value (and permissions).
On top of ATT protocol in the BLE stack, you have GATT and GAP. The GATT protocol defines services, characteristics, and descriptors and each of them is an attribute.
For example, a characteristic is an attribute with a handle, a type (a UUID that tells us that the attribute is a characteristic) and a value (the characteristic properties with a handle to the attribute value and so on). Inside the characteristic, you have an attribute that is the value of the characteristic and one or more descriptors that are themselves attributes.
You can see the attribute concept as the abstract type you can define concrete types like service, characteristic and descriptors.
I can suggest seeing the following video (intro on BLE) by Nordic.

BizTalk Orchestration - One input message to two different BizTalk Maps

I want to create an orchestration that allows a message to be received and for it to go through two different maps, one after the other. Which shapes would be required for this?
My idea was to use 'Parallel Actions' then have two 'Transform' shapes under each (With one having a 'Delay' shape so that this specific one follows), however reading up about 'Parallel Actions' seems to imply that the message will go to one path or the other, not send the same message to both direction.
How can I have the input message going through two BizTalk maps using Orchestration? What are the appropriate shapes to use?
You have two options:
Apply two maps sequentally with 2 Transform Shapes:
1) Source Message > Map1 > Destination Message 1
2) Source Message > Map2 > Destination Message 2
Send the Source Message to 2 different Send Ports, each one with one map configured.
If I understand your question correctly, you want to have two outbound maps. The input for your second map would be the output of your first map?
If so: you can just put two Transform shapes after each other. There is no need for a parallel actions shape.
Configure the Transform shapes to use the appropriate mapping and the mappings will be executed one after the other.
The other approach is to create a pipeline component capable of executing an XslCompiledTransform. Then, create a custom pipeline where both components are chained after each other and use that custom pipeline in your send port. Then you do not even need an orchestration (if no extra business logic is needed).
Up to you to make the correct decision, based on your specific needs.

Does vector<list<T>> guarantee that element addresses stay unchanged?

We all know that addresses of elements in vector<T> may change when we append more elements (due to resizing), while elements in list<T> remains at the same address.
The question is, what about vector<list<T>>? For example,
vector<list<T>> container;
// Insert some elements to container...
T* ptr = &(container[0].back());
// Insert more elements to container...
Can we assume that ptr stays valid?
Naively, I think it should, because when the vector resizes it should call the move constructor of list<T>, which should not copy/move individual elements. However, I don't know if the standard ensures this.
Sorry, no. std::list's move constructor is not noexcept. std::vector used std::move_if_noexcept when doing resizes, which will be copies for the contained std::lists. All the list nodes will be allocated and copied. Their addresses will not be stable.
You should probably make it a vector<list<T>*> rather than a vector<list<T>>. With a vector<list<T>*>, you can be certain that the contained pointers will not be changed (and that there won't be any heavy-weight copying of the inner lists) as they are values of the vector and the values of the vector are not changed by the expansion logic. This is much safer than relying on the copying of the internal lists to only move the head element and not reallocate any of the remaining nodes (it's also more understandable). Doing it the other way is difficult to understand and is just playing with fire.

Resources